Bug 291195
Summary: | [JSC] Iterator helpers incorrectly close iterators on early errors | ||
---|---|---|---|
Product: | WebKit | Reporter: | zloirock <zloirock> |
Component: | JavaScriptCore | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/148774612>
Yusuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/44191
EWS
Committed 293842@main (d6f3d9c7c304): <https://commits.webkit.org/293842@main>
Reviewed commits have been landed. Closing PR #44191 and removing active labels.