[webkit-reviews] review canceled: [Bug 235382] [JSC] move function wrapping logic to a new Function type : [Attachment 450055] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 26 12:35:00 PST 2022

Yusuke Suzuki <ysuzuki at apple.com> has canceled Caitlin Potter (:caitp)
<caitp at igalia.com>'s request for review:
Bug 235382: [JSC] move function wrapping logic to a new Function type

Attachment 450055: Patch


--- Comment #13 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 450055
  --> https://bugs.webkit.org/attachment.cgi?id=450055

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

Clearing r? since it is not completed. You can upload a WIP patch without r? by
using `--no-review` :)

> Source/JavaScriptCore/builtins/ShadowRealmPrototype.js:-60
> -	   delete wrapped['name'];
> -	   delete wrapped['length'];

Ditto to the previous comment.

> Source/JavaScriptCore/runtime/JSFunctionInlines.h:82
> +inline bool JSFunction::isRemoteFunction() const

Let's take VM& as a parameter.

> Source/JavaScriptCore/runtime/JSFunctionInlines.h:107
> +inline bool isRemoteFunction(JSValue value)

Let's take VM&.

> Source/JavaScriptCore/runtime/JSFunctionInlines.h:112
> +    JSFunction* function = jsCast<JSFunction*>(getJSFunction(value));
> +    if (!function)
> +	   return false;
> +    return function->isRemoteFunction();

Let's write as follows. I don't think we need getJSFunction here. And let's
take VM&.

inline bool isRemoteFunction(VM& vm, JSValue value)
    if (auto* function = jsDynamicCast<JSFunction*>(vm, value))
	return function->isRemoteFunction(vm);
    return false;

More information about the webkit-reviews mailing list