| Summary: | Using async function to Symbol.iterator results in infinite loop | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kanguk Lee <p51lee> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | mark.lam, webkit-bug-importer, yijia_huang, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
This is expected. The first microtask throws an error. But it does not matter to the second microtask. |
// 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