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

> +      CloseReadableByteStreamReader(this);
> +    }
> +  }
> +}
> +
> +function CallPull(controller) {
> +  const source = controller._underlyingByteSource;
> +
> +  const pullFunction = source['pull'];
> +  if (pullFunction === undefined) {
> +    return;
> +  }
> +
> +  const stream = controller._controlledReadableByteStream;
> +
> +  if (typeof pullFunction !== 'function') {

> I think it is better to just consolidate.

OK.

> In fact, maybe using CallOrNoop here would help clean up?

Good point. Since we now allow `enqueue()` anytime, it's reasonable to allow not implementing `pull()`. An underlying byte source that doesn't understand BYOB would only use `enqueue()`, and it's totally fine. So, it's also reasonable to allow leaving `pullInto()` undefined.

Fixed by 76bf9ecb54d6ea990f7803c2f8b482dc2bbd548d

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

Received on Thursday, 2 July 2015 05:38:06 UTC