-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.
Description
There's an edge case with the current Web IDL bindings for async iterators where manually calling return(); next()
could result in the next()
promise resolving before the return()
promise. The latest version of the Web IDL specification fixes this by updating the "ongoing promise" in the async iterator return()
method.
For Node.js, this affects ReadableStream.prototype[Symbol.asyncIterator]
. More specifically, this part needs to be changed:
node/lib/internal/webstreams/readablestream.js
Lines 547 to 554 in a8de25e
return(error) { | |
return state.current ? | |
PromisePrototypeThen( | |
state.current, | |
() => returnSteps(error), | |
() => returnSteps(error)) : | |
returnSteps(error); | |
}, |
- Web IDL spec change
- Web platform tests (for
ReadableStream[@@asyncIterator]
)
mcollina
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.