Summary: | [JSC] Offer @makeTypeError instead of exposing @TypeError | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||
Component: | JavaScriptCore | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ews-watchlist, mark.lam, saam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Yusuke Suzuki
2019-01-25 17:41:16 PST
Created attachment 363454 [details]
Patch
Attachment 363454 [details] did not pass style-queue:
ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5]
Total errors found: 1 in 18 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 363455 [details]
Patch
Comment on attachment 363455 [details] 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? Comment on attachment 363455 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363455&action=review Thank you >> Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:698 >> + > > This seems unnecessary. Removed. >> Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:762 >> + 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? I aligned this code to the other places, but it seems that this code is better in terms of performance. Reverted. Committed r242365: <https://trac.webkit.org/changeset/242365> |