[whatwg/streams] Set stored error from |reason| in abort(reason) (#903)

Previously, calling abort(reason) on a WritableStream would set the
stored error to a TypeError, meaning that future operations on that
WritableStream would reject with a TypeError. This resulted in losing
the original reason when an error happened in a pipe. Instead, retain
the abort reason in the stored error slot.

Similarly, aborting the writable side of a TransformStream would set the
stored error on the readable side to a TypeError. Make it use the reason
as well to reflect the new behaviour of the writable side.

Closes #896.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Set stored error from |reason| in abort(reason)

-- File Changes --

    M index.bs (12)
    M reference-implementation/lib/transform-stream.js (9)
    M reference-implementation/lib/writable-stream.js (4)
    M reference-implementation/web-platform-tests (2)

-- Patch Links --

https://github.com/whatwg/streams/pull/903.patch
https://github.com/whatwg/streams/pull/903.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/903

Received on Thursday, 8 March 2018 15:37:52 UTC