Re: [whatwg/streams] Aborting a stream should wait for pending writes (#619)

ricea commented on this pull request.



> @@ -2759,6 +2771,14 @@ writable stream is <a>locked to a writer</a>.
   1. Assert: _state_ is `"writable"` or `"closing"`.
   1. Let _error_ be a new *TypeError* indicating that the stream has been aborted.
   1. Perform ! WritableStreamError(_stream_, _error_).
+  1. Let _controller_ be _stream_.[[writableStreamController]].
+  1. Assert: _controller_ is not *undefined*.
+  1. If _controller_.[[writing]] is *true* or _controller_.[[inClose]] is *true*,
+    1. Set _stream_.[[pendingAbortRequest]] to <a>a new promise</a>.
+    1. If _controller_.[[writing]] is *true*, return the result of transforming _stream_.[[pendingAbortRequest]] by a
+    fulfillment handler that returns
+    ! WritableStreamDefaultControllerAbort(_stream_.[[writableStreamController]], _reason_).

Done

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

Received on Monday, 5 December 2016 02:11:04 UTC