[Webkit-unassigned] [Bug 247785] New: TypeError in parameter destructuring in async function should be a rejected promise

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 11 00:56:56 PST 2022


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

            Bug ID: 247785
           Summary: TypeError in parameter destructuring in async function
                    should be a rejected promise
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: p51lee at kaist.ac.kr

// input.js
async function f (...[ [] ]) { } 

f().catch(e => print("caught"));
_____________________

Hello,

Executing the input.js using JSC throws TypeError, but it should print "caught".

Running the input.js with JSC results in:

---
$ jsc input.js
Exception: TypeError: undefined is not an object (evaluating '[ [] ]')
f at input.js:1:22
global code at input.js:3:2
---

while other engines behave like:

---
# V8 (used console.log)
$ node input.js
caught

# GraalJS
$ js input.js
caught
---


WebKit version: 615.1.10

-- 
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/20221111/fd6a8cf6/attachment.htm>


More information about the webkit-unassigned mailing list