WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
193858
[JSC] Offer @makeTypeError instead of exposing @TypeError
https://bugs.webkit.org/show_bug.cgi?id=193858
Summary
[JSC] Offer @makeTypeError instead of exposing @TypeError
Yusuke Suzuki
Reported
2019-01-25 17:41:16 PST
And by doing so, we can make TypeError, ErrorPrototype, ErrorConstructor etc.'s dependency tree lazily-allocated.
Attachments
Patch
(33.63 KB, patch)
2019-03-03 02:37 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(33.63 KB, patch)
2019-03-03 03:27 PST
,
Yusuke Suzuki
mark.lam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2019-03-03 02:37:57 PST
Created
attachment 363454
[details]
Patch
EWS Watchlist
Comment 2
2019-03-03 02:41:22 PST
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.
Yusuke Suzuki
Comment 3
2019-03-03 03:27:34 PST
Created
attachment 363455
[details]
Patch
Mark Lam
Comment 4
2019-03-03 12:55:08 PST
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?
Yusuke Suzuki
Comment 5
2019-03-04 10:52:37 PST
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.
Yusuke Suzuki
Comment 6
2019-03-04 10:56:32 PST
Committed
r242365
: <
https://trac.webkit.org/changeset/242365
>
Radar WebKit Bug Importer
Comment 7
2019-03-04 10:57:18 PST
<
rdar://problem/48568181
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug