[JSC] AsyncFromSyncIterator should close its sync-iterator when throw is null or undefined - #39876
Merged
webkit-commit-queue merged 1 commit intoFeb 3, 2025
Conversation
Collaborator
|
EWS run on current version of this PR (hash 6224ecd) Details |
Constellation
approved these changes
Feb 3, 2025
…row` is null or undefined https://bugs.webkit.org/show_bug.cgi?id=286885 Reviewed by Yusuke 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]: tc39/ecma262#2600 [2]: v8/v8@6c3f7aa#diff-c18e5d5743326f6ba544801f6ce25154b785f759885651f98924d5b56dc1c2e6 * JSTests/stress/async-from-sync-iterator-prototype-throw-close-sync-iter.js: Added. (shouldBe): (shouldThrowAsync): (throw.new.Error.const.syncIterator.get throw): (throw.new.Error.const.asyncIterator): (throw.new.Error.async OurError): (throw.new.Error): (const.syncIterator.get throw): (throw.new.Error.async drainMicrotasks): (const.asyncIterator): (async OurError): (OurError): (NotOurError): (const.syncIterator.get return): (async drainMicrotasks): (async asyncIterator): * JSTests/test262/expectations.yaml: * Source/JavaScriptCore/builtins/AsyncFromSyncIteratorPrototype.js: (throw): Canonical link: https://commits.webkit.org/289726@main
webkit-commit-queue
force-pushed
the
eng/asyncfromsynciterator-return
branch
from
February 3, 2025 11:05
6224ecd to
72c371a
Compare
Collaborator
|
Committed 289726@main (72c371a): https://commits.webkit.org/289726@main Reviewed commits have been landed. Closing PR #39876 and removing active labels. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
72c371a
6224ecd