- From: Takeshi Yoshino <notifications@github.com>
- Date: Wed, 01 Jul 2015 06:06:44 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Wednesday, 1 July 2015 13:07:11 UTC
> + } > + > + DetachReadableByteStreamReader(reader); > +} > + > +function DestroyReadableByteStreamController(controller) { > + controller._pendingPullIntos = [] > + controller._queue = []; > +} > + > +function DetachReadableByteStreamReader(reader) { > + reader._ownerReadableByteStream._reader = undefined; > + reader._ownerReadableByteStream = undefined; > +} > + > +function EnqueueInReadableByteStreamController(controller, chunk) { Yeah, I also wondered why I didn't use it, but just remembered. The BYOB reader may consume only a part of a chunk in a queue. Since the existing queue-with-sizes machinery is designed to work chunk-wise, we need to shift, update (partially consume), and then unshift. See `FillPullIntoDescriptorFromQueue()`. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/361/files#r33675719
Received on Wednesday, 1 July 2015 13:07:11 UTC