WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
169778
import(arg) crashes when ToString(arg) throws
https://bugs.webkit.org/show_bug.cgi?id=169778
Summary
import(arg) crashes when ToString(arg) throws
Sathya Gunasekaran
Reported
2017-03-16 13:02:47 PDT
Test case: let x = { get toString() { throw new Error('wat'); } }; import(x); Expected result : a new rejected promise is created Actual result : Safari crashes and reloads the page
Attachments
Patch
(3.13 KB, patch)
2017-03-19 00:26 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2017-03-19 00:12:47 PDT
This is the same issue with
https://bugs.webkit.org/show_bug.cgi?id=167585
. We should not reject promises with Exception.
Yusuke Suzuki
Comment 2
2017-03-19 00:26:47 PDT
Created
attachment 304893
[details]
Patch
Yusuke Suzuki
Comment 3
2017-03-19 08:12:30 PDT
Comment on
attachment 304893
[details]
Patch r=me
Yusuke Suzuki
Comment 4
2017-03-19 08:13:37 PDT
(In reply to
comment #3
)
> Comment on
attachment 304893
[details]
> Patch > > r=me
oops, i've put incorrect words from my phone.
WebKit Commit Bot
Comment 5
2017-03-19 08:41:40 PDT
Comment on
attachment 304893
[details]
Patch Clearing flags on attachment: 304893 Committed
r214143
: <
http://trac.webkit.org/changeset/214143
>
WebKit Commit Bot
Comment 6
2017-03-19 08:41:46 PDT
All reviewed patches have been landed. Closing bug.
Saam Barati
Comment 7
2017-03-19 08:51:55 PDT
Is it always wrong to reject a promise with Excetion*? If so, we've made this mistake twice. Can we add a variant like reject(Exception*) = delete; Or Make reject(Exception*) do the right thing by grabbing the value
Mark Lam
Comment 8
2017-03-19 08:53:10 PDT
(In reply to
comment #7
)
> Is it always wrong to reject a promise with Excetion*? > If so, we've made this mistake twice. Can we add a variant like > reject(Exception*) = delete; > Or > Make reject(Exception*) do the right thing by grabbing the value
Either that, or have reject(Exception*) do the unwrapping automatically.
Yusuke Suzuki
Comment 9
2017-03-21 00:43:12 PDT
Opened.
https://bugs.webkit.org/show_bug.cgi?id=169908
I think adding reject(ExecState*, Exception*) interface is better since we have similar interface in WebCore::DOMPromise.
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