[webkit-reviews] review granted: [Bug 203351] [JSC] Remove wasmAwareLexicalGlobalObject : [Attachment 381770] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 23 21:56:05 PDT 2019


Mark Lam <mark.lam at apple.com> has granted Yusuke Suzuki <ysuzuki at apple.com>'s
request for review:
Bug 203351: [JSC] Remove wasmAwareLexicalGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=203351

Attachment 381770: Patch

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




--- Comment #6 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 381770
  --> https://bugs.webkit.org/attachment.cgi?id=381770
Patch

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

r=me with suggested improvement.

> Source/JavaScriptCore/interpreter/CallFrame.cpp:356
> +JSGlobalObject* CallFrame::lexicalGlobalObjectFromWasmCallee(VM& vm) const
> +{
> +#if ENABLE(WEBASSEMBLY)
> +    return
vm.wasmContext.load()->owner<JSWebAssemblyInstance>()->globalObject();
> +#else
> +    UNUSED_PARAM(vm);
> +    return nullptr;
> +#endif
> +}

Why not wrap the whole function in #if ENABLE(WEBASSEMBLY) and remove the #else
case altogether?  After all, this function can only be called if
ENABLE(WEBASSEMBLY).

> Source/JavaScriptCore/interpreter/CallFrame.h:170
> +	   JS_EXPORT_PRIVATE JSGlobalObject*
lexicalGlobalObjectFromWasmCallee(VM&) const;

Wrap in #if ENABLE(WEBASSEMBLY).


More information about the webkit-reviews mailing list