[whatwg/streams] Detect if the TransformStream errored inside write() and reject (#799)

If a TransformStream errored while the TransformStreamDefaultSink write() method
was waiting for backpressure to be relieved, it would assert inside
the TransformStreamStream operation.

Since it is not useful to call transform() once the stream is errored, return a
rejection from the write() method instead.

Also add a test for this case.
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/streams/pull/799

-- Commit Summary --

  * Detect if the TransformStream errored inside write() and reject

-- File Changes --

    M reference-implementation/lib/transform-stream.js (7)
    M reference-implementation/to-upstream-wpts/transform-streams/errors.js (26)

-- Patch Links --

https://github.com/whatwg/streams/pull/799.patch
https://github.com/whatwg/streams/pull/799.diff

-- 
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/799

Received on Friday, 15 September 2017 14:55:56 UTC