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

ricea commented on this pull request.



>  
   stream._state = 'errored';
   stream._storedError = e;
 
-  if (stream._pendingAbortRequest === undefined && stream._writer !== undefined) {
-    let readyPromiseIsPending = false;
-    if (oldState === 'writable' &&
-        WritableStreamDefaultControllerGetBackpressure(stream._writableStreamController) === true) {
-      readyPromiseIsPending = true;
+  // TODO(tyoshino): Given that writer.abort() fails immediately when the stream has been errored, shouldn't

I think we should try as much as possible to guarantee that the stream is quiescent when abort() returns. This also affects the timing of the return from pipeTo(), since that waits for WritableStreamAbort().

-- 
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#pullrequestreview-25504276

Received on Tuesday, 7 March 2017 12:56:36 UTC