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

> +
> +    this._queue = [];
> +    this._totalQueuedBytes = 0;
> +
> +    InvokeOrNoop(underlyingByteSource, 'start', [this]);
> +  }
> +
> +  close() {
> +    if (!IsReadableByteStreamController(this)) {
> +      throw new TypeError(
> +          'ReadableByteStreamController.prototype.close can only be used on a ReadableByteStreamController');
> +    }
> +
> +    const stream = this._controlledReadableByteStream;
> +
> +    if (stream._closeRequested) {

is _closeRequested on the stream or on the controller? If it's on the stream, then it should be initialized in the stream constructor to false, and the below this._closeRequested should be stream._closeRequested. If it's on the controller (probably better given your idea of moving stuff there), then this should be `this`, and it should be initialized in the controller constructor to false.

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

Received on Tuesday, 30 June 2015 08:08:58 UTC