RESOLVED FIXED 139613
Get rid of the DONT_FINALIZE_ON_MAIN_THREAD #define
https://bugs.webkit.org/show_bug.cgi?id=139613
Summary Get rid of the DONT_FINALIZE_ON_MAIN_THREAD #define
Anders Carlsson
Reported 2014-12-12 18:28:19 PST
Get rid of the DONT_FINALIZE_ON_MAIN_THREAD #define
Attachments
Patch (10.66 KB, patch)
2014-12-12 18:32 PST, Anders Carlsson
no flags
Patch (11.98 KB, patch)
2014-12-15 15:30 PST, Anders Carlsson
sam: review+
Anders Carlsson
Comment 1 2014-12-12 18:32:49 PST
Darin Adler
Comment 2 2014-12-15 09:07:28 PST
Comment on attachment 243240 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243240&action=review > Source/WebCore/platform/mac/WebCoreObjCExtras.h:36 > +#if defined(OBJC_NO_GC) && OBJC_NO_GC This checks both the defined’ness and value of OBJC_NO_GC. > Source/WebCore/platform/mac/WebCoreObjCExtras.mm:39 > +#ifndef OBJC_NO_GC This checks only the defined’ness of OBJC_NO_GC. These two can’t both be correct. > Source/WebCore/platform/mac/WebCoreObjCExtras.mm:62 > + Method method = class_getInstanceMethod(cls, @selector(dealloc)); > + > + IMP imp = method_getImplementation(method); > + wtfCallIMP<void>(imp, object, @selector(dealloc)); We should remove the strangely arbitrary blank line.
Anders Carlsson
Comment 3 2014-12-15 09:16:47 PST
(In reply to comment #2) > Comment on attachment 243240 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=243240&action=review > > > Source/WebCore/platform/mac/WebCoreObjCExtras.h:36 > > +#if defined(OBJC_NO_GC) && OBJC_NO_GC > > This checks both the defined’ness and value of OBJC_NO_GC. > > > Source/WebCore/platform/mac/WebCoreObjCExtras.mm:39 > > +#ifndef OBJC_NO_GC > > This checks only the defined’ness of OBJC_NO_GC. > > These two can’t both be correct. Here's what the API docs say: * OBJC_NO_GC 1: GC is not supported * OBJC_NO_GC undef: GC is supported in the first case, we want to check that OBJC_NO_GC is define to 1. IN the second case, we want to check that it's not set. I could make the second check more stringent by checking !defined(OBJC_NO_GC) || !OBJC_NO_GC, but I'm going to change things and make WebCoreObjCFinalizeOnMainThread be inlined unconditionally. > > > Source/WebCore/platform/mac/WebCoreObjCExtras.mm:62 > > + Method method = class_getInstanceMethod(cls, @selector(dealloc)); > > + > > + IMP imp = method_getImplementation(method); > > + wtfCallIMP<void>(imp, object, @selector(dealloc)); > > We should remove the strangely arbitrary blank line. Agreed.
Anders Carlsson
Comment 4 2014-12-15 15:30:23 PST
Anders Carlsson
Comment 5 2014-12-15 15:52:58 PST
Note You need to log in before you can comment on or make changes to this bug.