[whatwg/streams] Reject writer.ready promise on errors, instead of fulfilling (#526)

In the process of testing this, ported several tests to web-platform-tests format, and introduced the recording stream helpers that I am using extensively in #512.

---

Apologies if we discussed this before and came to a good reason for this behavior; I couldn't find anything by searching. Anyway, this seems much more intuitive to me... the previous behavior caused some of my pipe code to fail since I wrote the code expecting that ready would only be fulfilled when it was safe to write.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Reject writer.ready promise on errors, instead of fulfilling

-- File Changes --

    M index.bs (5)
    M reference-implementation/lib/writable-stream.js (4)
    M reference-implementation/test/writable-stream-abort.js (19)
    M reference-implementation/test/writable-stream.js (148)
    A reference-implementation/to-upstream-wpts/resources/recording-streams.js (74)
    A reference-implementation/to-upstream-wpts/resources/test-utils.js (43)
    A reference-implementation/to-upstream-wpts/writable-streams/aborting.https.html (12)
    A reference-implementation/to-upstream-wpts/writable-streams/aborting.js (47)
    A reference-implementation/to-upstream-wpts/writable-streams/bad-underlying-sinks.https.html (14)
    A reference-implementation/to-upstream-wpts/writable-streams/bad-underlying-sinks.js (78)

-- Patch Links --

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

Received on Thursday, 6 October 2016 23:03:49 UTC