Re: [whatwg/streams] Various fixes for readable byte streams (#1123)

I apologize for us leaving this PR alone for so long. I had a few weeks in a row of vaccine recovery, vacation, and then working on other stuff. (Although, I see it's still in draft state; is there more to do?)

Of the goals listed in the OP, I'm slightly concerned about

> .respondWithNewView() must now be called with an empty view when the stream is closed. This aligns it with .respond(bytesWritten), which requires bytesWritten to be 0 when closed.

and

> .respondWithNewView(newView) must now be called with a view whose view.buffer.byteLength matches that of the BYOB request. Ideally, we would like to assert that the new view's buffer is the "transferred version" of the BYOB request's buffer, but that's not possible yet with the tools currently provided by the ECMAScript specification.

since they have the potential to break code. I'm not as worried about compat, but slightly worried about potentially shutting down valid use cases. I admit this is largely because I lost all the context of our previous discussions; I recall being somewhat convinced these were good changes.

I'd also appreciate @ricea's review from an implementation point of view!

-- 
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/1123#issuecomment-840802493

Received on Thursday, 13 May 2021 20:07:32 UTC