Bug 289430
Summary: | [JSC] `Set#union` and `Set#synmmetric` should get `next` before cloning `this` | ||
---|---|---|---|
Product: | WebKit | Reporter: | Sosuke Suzuki <aosukeke> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Sosuke Suzuki
According to the spec[1][2], `Set#symmetricDifference` and `Set#union` get
keys iterator's `next` method via `GetIteratorFromMethod`[3] and
`GetIteratorDirect`[4] before cloning `this`.
However, the current JSC implementation don't get it. Getting `next` method
can occur observable side effects, so we need to fix it.
[1]: https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
[2]: https://tc39.es/ecma262/#sec-set.prototype.union
[3]: https://tc39.es/ecma262/#sec-getiteratorfrommethod
[4]: https://tc39.es/ecma262/#sec-getiteratordirect
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Sosuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/42158
EWS
Committed 291875@main (b07e269b5a00): <https://commits.webkit.org/291875@main>
Reviewed commits have been landed. Closing PR #42158 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/146627064>