Re: [streams] Merge ReadableByteStream into ReadableStream (#430)

> -    1. Remove _entry_ from *this*@[[queue]], shifting all other elements downward (so that the second becomes the first, and so on).
> -    1. Subtract _entry_.[[byteLength]] from *this*@[[totalQueuedBytes]].
> -    1. Perform ReadableStreamBYOBControllerHandleQueueDrain(*this*).
> -    1. Let _view_ be Construct(%Uint8Array%, «_entry_.[[buffer]], _entry_.[[byteOffset]], _entry_.[[byteLength]]»).
> -    1. Return a promise resolved with CreateIterResultObject(_view_, *false*).
> +  1. If ReadableStreamGetNumReadRequests(_stream_) is 0,
> +    1. If *this*[[totalQueuedBytes]] > 0,
> +      1. Let _entry_ be the first element of *this*@[[queue]].
> +      1. Remove _entry_ from *this*@[[queue]], shifting all other elements downward (so that the second becomes the first, and so on).
> +      1. Subtract _entry_.[[byteLength]] from *this*@[[totalQueuedBytes]].
> +      1. Perform ReadableStreamBYOBControllerHandleQueueDrain(*this*).
> +      1. Let _view_ be Construct(%Uint8Array%, «_entry_.[[buffer]], _entry_.[[byteOffset]], _entry_.[[byteLength]]»).
> +      1. Return a promise resolved with CreateIterResultObject(_view_, *false*).
> +    1. Let _autoAllocateChunkSize_ be *this*@[[autoAllocateChunkSize]].
> +    1. If _autoAllocateChunkSize_ is not *undefined*,
> +      1. Let _buffer_ be Construct(`ArrayBuffer`, «_autoAllocateChunkSize_»).

%ArrayBuffer%

---
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/430/files/a4c2b169b804da3046ca04b76c9883dcad476b23..27bbfcd3cdfae9be413c45869426c5191ec9f0d5#r57058675

Received on Tuesday, 22 March 2016 20:04:21 UTC