Re: [whatwg/streams] Define WritableStreamDefaultController.signal (#1132)

@domenic commented on this pull request.



> @@ -4421,7 +4441,8 @@ the {{WritableStream}}'s public API.
  1. [=Reject=] |stream|.[=WritableStream/[[inFlightCloseRequest]]=] with |error|.
  1. Set |stream|.[=WritableStream/[[inFlightCloseRequest]]=] to undefined.
  1. Assert: |stream|.[=WritableStream/[[state]]=] is "`writable`" or "`erroring`".
- 1. If |stream|.[=WritableStream/[[pendingAbortRequest]]=] is not undefined,
+ 1. If |stream|.[=WritableStream/[[pendingAbortRequest]]=] is not undefined and |error| is not an

> But in this case, the operation fails because of the abort call coming from the producer, so I think it should be rejected with the abort reason

Well, but it only "failed" because the underlying sink said it failed. The underlying sink should just not return a rejection from the `close()` method at all, IMO. Then the usual logic [where calling `abort(r)` during close causes `closed` to reject with `r`](https://github.com/web-platform-tests/wpt/blob/master/streams/writable-streams/aborting.any.js#L231-L245) will take over.

-- 
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/1132#discussion_r645740372

Received on Friday, 4 June 2021 17:32:36 UTC