[Webkit-unassigned] [Bug 259439] New: await promise prevents error being thrown in JavaScript module

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 24 01:06:43 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=259439

            Bug ID: 259439
           Summary: await promise prevents error being thrown in
                    JavaScript module
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: beaufort.francois at gmail.com

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/

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230724/7c25a43d/attachment-0001.htm>


More information about the webkit-unassigned mailing list