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

> +    const stream = controller._controlledReadableByteStream;
> +    if (stream._state === 'readable') {
> +      ErrorReadableByteStream(stream, e);
> +    }
> +  }
> +
> +  controller._insideUnderlyingByteSource = false;
> +}
> +
> +function CallPullOrPullIntoLaterIfNeeded(controller) {
> +  if (controller._insideUnderlyingByteSource) {
> +    controller._callPullOrPullIntoLaterIfNeeded = true;
> +    return;
> +  }
> +
> +  Promise.resolve().then(CallPullOrPullIntoRepeatedlyIfNeeded.bind(undefined, controller));

Use `process.nextTick(() => ...)` to enqueue a microtask.

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

Received on Tuesday, 30 June 2015 08:54:55 UTC