Re: [whatwg/streams] Allow other specifications to create readable byte streams (#1130)

Okay, there's still an important problem. After a specification calls "close a readable stream" on a readable byte stream, *the current BYOB request is still pending*. We must somehow perform the equivalent of `controller.byobRequest.respond(0)` (like we do in [our tests](https://github.com/web-platform-tests/wpt/blob/87a4c80598aee5178c385628174f1832f5a28ad6/streams/readable-byte-streams/general.any.js#L1752-L1753)) to return ownership of the BYOB buffer and fulfill any pending `byobReader.read(view)` calls.

I suppose we have to extend "close a readable stream" to handle this? But then:
* Is it safe to assume that, if the other specification calls "close a readable stream", then it is done using the current BYOB request view?
* What if the other specification has transferred the current BYOB request view to a different realm? 😬

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

Received on Monday, 12 July 2021 21:32:43 UTC