[webkit-reviews] review granted: [Bug 189652] Use OpaqueJSString rather than JSRetainPtr inside WebKit : [Attachment 349873] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 17 09:29:13 PDT 2018
Saam Barati <sbarati at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 189652: Use OpaqueJSString rather than JSRetainPtr inside WebKit
https://bugs.webkit.org/show_bug.cgi?id=189652
Attachment 349873: Patch
https://bugs.webkit.org/attachment.cgi?id=349873&action=review
--- Comment #3 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 349873
--> https://bugs.webkit.org/attachment.cgi?id=349873
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=349873&action=review
r=me
> Source/JavaScriptCore/API/JSContext.mm:104
> + auto sourceURLJS = OpaqueJSString::create([sourceURL absoluteString]);
This removes a null check on sourceURL. Is that intended?
> Source/JavaScriptCore/API/JSContext.mm:105
> + JSValueRef result = JSEvaluateScript(m_context, scriptJS.get(), nullptr,
sourceURLJS.get(), 0, &exceptionValue);
Ignore the above comment (I’m on my phone and can’t edit it). I knew that ObjC
message send is safe on null, but I didn’t know it’s guaranteed to also return
null
More information about the webkit-reviews
mailing list