[webkit-reviews] review granted: [Bug 193858] [JSC] Offer @makeTypeError instead of exposing @TypeError : [Attachment 363455] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 3 12:55:08 PST 2019


Mark Lam <mark.lam at apple.com> has granted Yusuke Suzuki <ysuzuki at apple.com>'s
request for review:
Bug 193858: [JSC] Offer @makeTypeError instead of exposing @TypeError
https://bugs.webkit.org/show_bug.cgi?id=193858

Attachment 363455: Patch

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




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

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

r=me

> Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:698
> +

This seems unnecessary.

> Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:762
> -    JSGlobalObject* globalObject = exec->lexicalGlobalObject();
> -    VM& vm = globalObject->vm();
> +    VM& vm = exec->vm();
>      auto scope = DECLARE_THROW_SCOPE(vm);
>  
> +    JSGlobalObject* globalObject = exec->lexicalGlobalObject();

Why make this change?  It's more efficient to get the vm from the globalObject
than from the ExecState, and getting the lexicalGlobalObject() cannot throw an
exception, can it?


More information about the webkit-reviews mailing list