Re: [whatwg/streams] async iteration over a ReadableStream containing a rejected Promise will not clean up (Issue #1266)

Perhaps we should handle this in the WebIDL binding? That is, change the [asynchronous iterator prototype object](https://webidl.spec.whatwg.org/#es-asynchronous-iterator-prototype-object) so the *rejectSteps* in step 8.7 call the [asynchronous iterator return](https://webidl.spec.whatwg.org/#asynchronous-iterator-return) algorithm.

Otherwise, other specs that define an async iterable (such as the [File System API](https://fs.spec.whatwg.org/#api-filesystemdirectoryhandle-asynciterable)) may run into the same issue.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1266#issuecomment-1497128506
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/issues/1266/1497128506@github.com>

Received on Wednesday, 5 April 2023 08:40:38 UTC