Re: [streams] Byte stream update, including reference implementation (#361)

> +  }
> +
> +  DetachReadableByteStreamReader(reader);
> +}
> +
> +function DestroyReadableByteStreamController(controller) {
> +  controller._pendingPullIntos = []
> +  controller._queue = [];
> +}
> +
> +function DetachReadableByteStreamReader(reader) {
> +  reader._ownerReadableByteStream._reader = undefined;
> +  reader._ownerReadableByteStream = undefined;
> +}
> +
> +function EnqueueInReadableByteStreamController(controller, chunk) {

Maybe just reuse the queue-with-sizes machinery already in the spec? Then you wouldn't need _totalQueuedBytes. Obviously it is less efficient, and in a real implementation we would use something like _totalQueuedBytes. But it is perhaps simpler and less work.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/361/files#r33552998

Received on Tuesday, 30 June 2015 08:59:14 UTC