[whatwg/streams] Piping should not try to write if there is an error queued (#728)

Similar to https://github.com/whatwg/streams/issues/727, but this affects the spec, not just the reference implementation.

After https://github.com/whatwg/streams/pull/726 lands, pipeTo() will say to write anything that was read, unless there is a close queued, or the stream is errored/closed.

But we should also handle the case of there being an error in progress. Currently this means an abort is queued, but after #721 things in that area will be more uniform, so we should wait to fix this until that lands.

Probably when we do so we'll want to factor out some writable stream abstract op like WritableStreamCouldWriteSucceed() and use that in write() and in the two branches of pipeTo().

In practice the impact here is not so big: basically it avoids an extra trip to the writer, which will immediately throw away the attempt at writing. I'm not even sure if it's testable.

-- 
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/issues/728

Received on Thursday, 6 April 2017 12:17:50 UTC