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 it would be good if the behaviour was the some regardless of the order of controller.error() and abort(), but it's not sufficiently important to be worth adding additional complexity.

In general I don't feel strongly about what happens after controller.error() because I assume it means the underlying transport has failed and any ongoing writes are just going to be lost anyway.

-- 
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_r104855103

Received on Wednesday, 8 March 2017 06:52:17 UTC