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 these can be omitted. If it's not a function trying to call it will fail, so you can just use the catch block.

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

Received on Tuesday, 30 June 2015 08:49:17 UTC