[Webkit-unassigned] [Bug 279876] New: [JSC] Iterator Helpers methods should not iterate an array
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 18 01:19:13 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=279876
Bug ID: 279876
Summary: [JSC] Iterator Helpers methods should not iterate an
array
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: aosukeke at gmail.com
We implemented a function called `forEachInIteratorProtocol` to implement
`Iterator.prototype.toArray`[1]. As the name suggests, this function iterates over objects that
conform to the iterator protocol, but it also iterates over fast arrays.
According to the specification, this behavior is unexpected[2].
This patch modifies the `forEachInIteratorProtocol` function to stop iterating over arrays. It also
removes the fast path for fast arrays in `Iterator.prototype.toArray`[3].
[1]: https://commits.webkit.org/283381@main
[2]: https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
[3]: https://commits.webkit.org/283381@main
--
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/20240918/c32a078d/attachment.htm>
More information about the webkit-unassigned
mailing list