[webkit-reviews] review granted: [Bug 107778] Objective-C API: JSContext exception property causes reference cycle : [Attachment 185827] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 31 12:59:14 PST 2013
Darin Adler <darin at apple.com> has granted Mark Hahnenberg
<mhahnenberg at apple.com>'s request for review:
Bug 107778: Objective-C API: JSContext exception property causes reference
cycle
https://bugs.webkit.org/show_bug.cgi?id=107778
Attachment 185827: Patch
https://bugs.webkit.org/attachment.cgi?id=185827&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=185827&action=review
> Source/JavaScriptCore/API/JSContext.mm:99
> + if (m_exception)
> + return [JSValue valueWithValue:toRef(m_exception.get())
inContext:self];
> + return nil;
Normally WebKit style is to use early return for the exceptional cases, so the
return nil would come first.
Is the special case for nil needed? Does valueWithValue:inContext: handle null
properly? Do we need to optimize the null case?
More information about the webkit-reviews
mailing list