Bug 291195

Summary: [JSC] Iterator helpers incorrectly close iterators on early errors
Product: WebKit Reporter: zloirock <zloirock>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: keith_miller, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

zloirock
Reported 2025-04-07 05:07:00 PDT
Iterator.prototype.drop.call({ next() { return { done: true } }, return() { this.closed = true } }, NaN) Returns TypeError (Iterator result interface is not an object), expected RangeError (Iterator.prototype.drop argument must not be NaN). https://tc39.es/ecma262/#sec-iteratorclose - exit on step 5, not 7.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-04-07 15:04:23 PDT
Yusuke Suzuki
Comment 2 2025-04-17 05:32:25 PDT
EWS
Comment 3 2025-04-17 21:09:24 PDT
Committed 293842@main (d6f3d9c7c304): <https://commits.webkit.org/293842@main> Reviewed commits have been landed. Closing PR #44191 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.