[webkit-reviews] review granted: [Bug 225553] Introduce JSObject::getIfPropertyExists helper : [Attachment 428074] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 7 20:41:26 PDT 2021
Alexey Shvayka <shvaikalesh at gmail.com> has granted Ross Kirsling
<ross.kirsling at sony.com>'s request for review:
Bug 225553: Introduce JSObject::getIfPropertyExists helper
https://bugs.webkit.org/show_bug.cgi?id=225553
Attachment 428074: Patch
https://bugs.webkit.org/attachment.cgi?id=428074&action=review
--- Comment #2 from Alexey Shvayka <shvaikalesh at gmail.com> ---
Comment on attachment 428074
--> https://bugs.webkit.org/attachment.cgi?id=428074
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=428074&action=review
Sweet! Thank you for the follow-up. I presume there might be more usages for
getIfPropertyExists() in future (like around GetBindingValue).
r=me with error handling suggestion.
> Source/JavaScriptCore/runtime/JSObjectInlines.h:205
> +
Since getIfPropertyExists() call sites should check exception either way, I
think we can completely drop exception handling from this helper.
At this point (hasProperty: true), we are guaranteed to be exception-free, and
can just return the ternary expression.
More information about the webkit-reviews
mailing list