Bug 288714
Summary: | [JSC] `%WrapForValidIteratorPrototype%.return` should not throw `TypeError` when underlying iterator's `return` method is null | ||
---|---|---|---|
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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Sosuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/41511
EWS
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
<rdar://problem/145822380>