RESOLVED INVALID247790
Using async function to Symbol.iterator results in infinite loop
https://bugs.webkit.org/show_bug.cgi?id=247790
Summary Using async function to Symbol.iterator results in infinite loop
Kanguk Lee
Reported 2022-11-11 01:24:35 PST
// input.js var obj = { [ Symbol . iterator ]: async ( ) => { await 0 ; while ( true ) ; } } for ( { } of obj ); ______________________________ Hello, Executing the input.js using JSC, it throws TypeError but never terminates. Running the input.js with JSC results in: --- $ jsc input.js Exception: TypeError: undefined is not a function (near '...{ } of obj...') global code@input.js:8:10 // infinite loop --- WebKit version: 615.1.10
Attachments
Radar WebKit Bug Importer
Comment 1 2022-11-14 08:15:52 PST
Yusuke Suzuki
Comment 2 2022-11-14 08:48:32 PST
This is expected. The first microtask throws an error. But it does not matter to the second microtask.
Note You need to log in before you can comment on or make changes to this bug.