Bug 259439

Summary: await promise prevents error being thrown in JavaScript module
Product: WebKit Reporter: beaufort.francois
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bugs.webkit, mark.lam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

beaufort.francois
Reported 2023-07-24 01:06:43 PDT
I noticed awaiting a promise after an error was thrown in a JavaScript module does not actually throw the error. window.onerror is never called, and the JavaScript console is empty. ``` <script type="module">   throw new Error(); // Adding this line will never throw the error in JavaScript console.   await Promise.resolve(); </script> ``` Note that I can't reproduce in Chrome and Firefox. Demo: https://early-glamorous-botany.glitch.me/
Attachments
Radar WebKit Bug Importer
Comment 1 2023-07-31 01:07:16 PDT
Alexey Shvayka
Comment 2 2024-04-06 20:22:54 PDT
*** Bug 258662 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.