Re: [whatwg/streams] Align WritableStream structure with ReadableStream structure (#488)

> +    return false;
> +  }
> +
> +  return true;
> +}
> +
> +function WritableStreamAbort(stream, reason) {
> +  const state = stream._state;
> +  if (state === 'closed') {
> +    return Promise.resolve(undefined);
> +  }
> +  if (state === 'errored') {
> +    return Promise.reject(stream._storedError);
> +  }
> +
> +  assert(state === 'writable' || state === 'waiting' || state === 'closing');

Interesting. I bet most of the loss comes from eliminating _backpressure?

I think we should add a non-normative note advising implementations to cache the result of WritableStreamDefaultControllerGetBackpressure (and invalidate it under... which conditions?).

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/488/files/dfa07172203b4c292cfb5a3fc88e821a1db7c3db#r73118656

Received on Tuesday, 2 August 2016 08:58:57 UTC