RESOLVED FIXED 288714
[JSC] `%WrapForValidIteratorPrototype%.return` should not throw `TypeError` when underlying iterator's `return` method is null
https://bugs.webkit.org/show_bug.cgi?id=288714
Summary [JSC] `%WrapForValidIteratorPrototype%.return` should not throw `TypeError` w...
Sosuke Suzuki
Reported 2025-02-27 04:31:58 PST
ccording to the spec[1], `%WrapForValidIteratorPrototype%.return` returns `{ done: true, value: undefined }` if the underlying iterator's `return` method is `null` or `undefined`. However, our JSC throws `TypeError` if the underlying iterator's `return` method is `null`. This patch fixes it to comply with the spec. [1]: https://tc39.es/ecma262/#sec-%wrapforvaliditeratorprototype%.return
Attachments
Sosuke Suzuki
Comment 1 2025-02-27 04:34:58 PST
EWS
Comment 2 2025-02-27 22:26:05 PST
Committed 291302@main (a9b3c904d0bb): <https://commits.webkit.org/291302@main> Reviewed commits have been landed. Closing PR #41511 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-02-27 22:27:15 PST
Note You need to log in before you can comment on or make changes to this bug.