Re: [whatwg/streams] Rewrite to use Web IDL, and generally modernize (#1035)

@domenic commented on this pull request.



>  </div>
 
-<emu-alg>
-  1. If ! IsReadableByteStreamController(*this*) is *false*, throw a *TypeError* exception.
-  1. If *this*.[[closeRequested]] is *true*, throw a *TypeError* exception.
-  1. If *this*.[[controlledReadableByteStream]].[[state]] is not `"readable"`, throw a *TypeError* exception.
-  1. If Type(_chunk_) is not Object, throw a *TypeError* exception.
-  1. If _chunk_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception.
-  1. If ! IsDetachedBuffer(_chunk_.[[ViewedArrayBuffer]]) is *true*, throw a *TypeError* exception.

Hmm. I'm thinking we should either reject all zero-length chunks here, or accept them. We shouldn't treat detached specially.

I'll reject zero-length chunks for now, here and in respondWithNewView.

-- 
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/1035#discussion_r412320560

Received on Tuesday, 21 April 2020 16:51:38 UTC