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

> +    }
> +
> +    const stream = this._controlledReadableByteStream;
> +
> +    if (stream._closeRequested) {
> +      throw new TypeError('stream is closed or draining');
> +    }
> +    if (stream._state !== 'readable') {
> +      throw new TypeError('The stream is not in the readable state and cannot be enqueued to');
> +    }
> +
> +    const reader = stream._reader;
> +
> +    if (reader === undefined) {
> +      EnqueueInReadableByteStreamController(this, chunk);
> +      return;

Yeah, agreed. I changed them to use if-elses with leaving error handling ones as-is. 14e3bbc707d21f8243bdd49d4a5bc74dae26164a

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

Received on Tuesday, 30 June 2015 10:55:33 UTC