[webkit-reviews] review granted: [Bug 225565] [JSC] Fix invalid exception checks after recent ErrorInstance changes : [Attachment 428096] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 8 17:40:43 PDT 2021


Alexey Shvayka <shvaikalesh at gmail.com> has granted Ross Kirsling
<ross.kirsling at sony.com>'s request for review:
Bug 225565: [JSC] Fix invalid exception checks after recent ErrorInstance
changes
https://bugs.webkit.org/show_bug.cgi?id=225565

Attachment 428096: Patch

https://bugs.webkit.org/attachment.cgi?id=428096&action=review




--- Comment #2 from Alexey Shvayka <shvaikalesh at gmail.com> ---
Comment on attachment 428096
  --> https://bugs.webkit.org/attachment.cgi?id=428096
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=428096&action=review

Fancy! r=me with nits.

> Source/JavaScriptCore/runtime/JSObjectInlines.h:201
> +    EXCEPTION_ASSERT(!scope.exception() || !hasProperty);

Please consider exception check in JSObject::get():
https://github.com/WebKit/WebKit/blob/f418737fae10f605d08e4de1a2ea0f37d977b28f/
Source/JavaScriptCore/runtime/JSObject.h#L1500.
I wonder if we need to handle termination exception as well, since HasProperty
can be implemented by userland code?

> Source/JavaScriptCore/runtime/JSObjectInlines.h:204
> +

scope.release();

> Source/JavaScriptCore/runtime/JSObjectInlines.h:206
> +	   RELEASE_AND_RETURN(scope, get(globalObject, propertyName));

return get(globalObject, propertyName);

> Source/JavaScriptCore/runtime/JSObjectInlines.h:208
> +    RELEASE_AND_RETURN(scope, slot.getValue(globalObject, propertyName));

return slot.getValue(globalObject, propertyName);


More information about the webkit-reviews mailing list