Bug 286885
| Summary: | [JSC] `AsyncFromSyncIterator` should close its sync -iterator when `throw` is null or undefined | ||
|---|---|---|---|
| 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 | ||
| Bug Depends on: | |||
| Bug Blocks: | 273768 | ||
Sosuke Suzuki
The normative change for `AsyncFromSyncIterator`[1] includes the following two changes:
1. AsyncFromSyncIterator now closes the sync iterator when `throw` is called on the
wrapper but is not implemented on the sync iterator. In that case, it updates the
rejection value to a `TypeError` to reflect the contract violation.
2. AsyncFromSyncIterator closes its sync iterator when the sync iterator yields a
rejected promise as its value.
This normative change has already been implemented in V8[2]. This patch changes to
implement only the first change.
[1]: https://github.com/tc39/ecma262/pull/2600
[2]: https://github.com/v8/v8/commit/6c3f7aa4c76af4c3e0c89c5c279f2b98867c35f0#diff-c18e5d5743326f6ba5
44801f6ce25154b785f759885651f98924d5b56dc1c2e6
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Sosuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/39876
EWS
Committed 289726@main (72c371adc8fe): <https://commits.webkit.org/289726@main>
Reviewed commits have been landed. Closing PR #39876 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/144077495>