Re: [whatwg/streams] Factor out condition to check pending operation (#672)

tyoshino commented on this pull request.



>    1. Let _controller_ be _stream_.[[writableStreamController]].
   1. Assert: _controller_ is not *undefined*.
-  1. Let _readyPromiseIsPending_ be *false*.
-  1. If _state_ is `"writable"` and !
-     WritableStreamDefaultControllerGetBackpressure(_stream_.[[writableStreamController]]) is *true*, set
-     _readyPromiseIsPending_ to *true*.
-  1. If _controller_.[[writing]] is *false* and _controller_.[[inClose]] is *false*,
-    1. If _stream_.[[writer]] is not *undefined*, perform !
-       WritableStreamDefaultWriterEnsureReadyPromiseRejectedWith(_stream_.[[writer]], _error_, _readyPromiseIsPending_).
+  1. Let _writer_ be _stream_.[[writer]].
+  1. If _writer_ is not *undefined*,
+    1. If ! WritableStreamCloseQueuedOrInFlight(_stream_) is *false* and _stream_.[[backpressure]] is *true*,
+       <a>reject</a> _writer_.[[readyPromise]] with _error_.
+    1. Otherwise, set _writer_.[[readypromise]] to <a>a promise rejected with</a> _error_.

Fixed

-- 
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/672#discussion_r105083421

Received on Thursday, 9 March 2017 04:11:14 UTC