Re: [whatwg/streams] Mark promise rejections for "state promises" as handled (#607)

OK, this should be ready to go. Here is a proposed commit message:

```
Mark promise rejections for "state promises" as handled

This fixes #547, by marking the state promises (reader.closed, writer.closed, and writer.ready) as handled whenever they are rejected. It also overhauls the tests to handle all rejections, as apparently this will be enforced by testharness.js soon: see https://github.com/w3c/testharness.js/commit/7716e2581a86dfd9405a9c00547a7504f0c7fe94.

In the process, this adds additional test coverage for many rejections: since we have to handle them anyway, we might as well test them with promise_rejects. It also led to a fix to the completely-broken test "WritableStream should call underlying sink's close if no abort is supplied" in aborting.js. Finally, it uncovered an issue where ongoing write() calls would reject if abort() is called subsequently, even if the ongoing write succeeds according to the underlying sink; this led to temporarily commenting out the test "Aborting a WritableStream prevents further writes after any that are in progress", and opening #611 to track fixing that.

In terms of spec changes, this also discovered that WritableStreamDefaultWriter was returning rejected promises that its caller had no use for. This has been fixed as well.
```

-- 
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/607#issuecomment-260501826

Received on Monday, 14 November 2016 23:50:16 UTC