RESOLVED FIXED 54257
Make DefaultGCActivityCallback for PLATFORM(CF) Easier to Subclass
https://bugs.webkit.org/show_bug.cgi?id=54257
Summary Make DefaultGCActivityCallback for PLATFORM(CF) Easier to Subclass
Joseph Pecoraro
Reported 2011-02-10 16:18:48 PST
Allow the CFRunLoop to be specified in a constructor.
Attachments
[PATCH] Proposed Solution (4.23 KB, patch)
2011-02-10 16:32 PST, Joseph Pecoraro
ggaren: review+
Joseph Pecoraro
Comment 1 2011-02-10 16:32:48 PST
Created attachment 82071 [details] [PATCH] Proposed Solution I'm open to suggestions for a better name for "commonConstructor". Also I'm fine with making that private.
Geoffrey Garen
Comment 2 2011-02-10 16:46:18 PST
Comment on attachment 82071 [details] [PATCH] Proposed Solution View in context: https://bugs.webkit.org/attachment.cgi?id=82071&action=review r=me > Source/JavaScriptCore/ChangeLog:8 > + A subclass may want to specify the CFRunLoop the Garbage Collection. It Typo, I think. > Source/JavaScriptCore/runtime/GCActivityCallbackCF.cpp:86 > + memset(&d->context, '\0', sizeof(CFRunLoopTimerContext)); '\0' is a strange way to say '0'. I know you didn't write this code initially, but you might as well change it to '0'.
Joseph Pecoraro
Comment 3 2011-02-10 17:10:12 PST
Joseph Pecoraro
Comment 4 2011-02-10 17:10:44 PST
> > Source/JavaScriptCore/ChangeLog:8 > > + A subclass may want to specify the CFRunLoop the Garbage Collection. It > > Typo, I think. Yep, I cleaned up my ChangeLog mistakes. > > Source/JavaScriptCore/runtime/GCActivityCallbackCF.cpp:86 > > + memset(&d->context, '\0', sizeof(CFRunLoopTimerContext)); > > '\0' is a strange way to say '0'. I know you didn't write this code initially, but you might as well change it to '0'. Done. Thanks!
Pratik Solanki
Comment 5 2011-02-10 17:14:17 PST
(In reply to comment #4) > > '\0' is a strange way to say '0'. I know you didn't write this code initially, but you might as well change it to '0'. > > Done. Thanks! I think Geoff meant to say pass 0, not '0'. Passing '0' to memset will initialize the memory to ASCII character 0.
Joseph Pecoraro
Comment 6 2011-02-10 17:18:32 PST
(In reply to comment #5) > (In reply to comment #4) > > > '\0' is a strange way to say '0'. I know you didn't write this code initially, but you might as well change it to '0'. > > > > Done. Thanks! > > I think Geoff meant to say pass 0, not '0'. Passing '0' to memset will initialize the memory to ASCII character 0. Yes, entirely my fault. I took that literally. I landed a follow-up fix. Unreviewed since initially this was a review comment. http://trac.webkit.org/changeset/78292 Thanks!
Note You need to log in before you can comment on or make changes to this bug.