[webkit-reviews] review denied: [Bug 112856] Objective-C API: wrapperClass holds a static JSClassRef, which causes JSGlobalObjects to leak : [Attachment 194182] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 20 23:25:27 PDT 2013
Geoffrey Garen <ggaren at apple.com> has denied Mark Hahnenberg
<mhahnenberg at apple.com>'s request for review:
Bug 112856: Objective-C API: wrapperClass holds a static JSClassRef, which
causes JSGlobalObjects to leak
https://bugs.webkit.org/show_bug.cgi?id=112856
Attachment 194182: Patch
https://bugs.webkit.org/attachment.cgi?id=194182&action=review
------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=194182&action=review
> Source/JavaScriptCore/API/JSAPIWrapperObject.cpp:55
> + CFRelease(wrapperObject->wrappedObject());
CFRelease is not always the same as -[NSObject release], so this is a no-no.
Let's compile this file as Objective-C++ and call -release.
> Source/JavaScriptCore/API/JSWrapperMap.mm:360
> + constructor = objectWithCustomBrand(m_context, [NSString
stringWithFormat:@"%sConstructor", className], [m_class retain]);
Why are we calling -retain here? You should only call -retain when storing a
reference into a data member.
More information about the webkit-reviews
mailing list