WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 259439
258662
Promise rejections in top-level await can't be handled
https://bugs.webkit.org/show_bug.cgi?id=258662
Summary
Promise rejections in top-level await can't be handled
Peter Gassner
Reported
2023-06-29 02:13:25 PDT
When a Promise is rejected in a JavaScript module in a top-level await position, there is no way to handle the error in WebKit. Given an HTML document <html> <script src="test.js" type="module"></script> </html> and a script // test.js window.onerror = console.log; window.addEventListener('unhandledrejection', console.log) await Promise.reject(new Error('This should be handled')); export {}; WebKit doesn't propagate the rejected Promise to the error handlers on window and instead crashes silently. Both Gecko and Chromium let us handle this kind of error with `window.onerror`.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-07-06 02:14:16 PDT
<
rdar://problem/111837095
>
Alexey Shvayka
Comment 2
2024-04-06 20:22:54 PDT
*** This bug has been marked as a duplicate of
bug 259439
***
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