Re: [whatwg/streams] Refactor writable stream erroring to be centralized (#705)

tyoshino commented on this pull request.



> -  stream._storedError = reason;
-
-  if (stream._pendingAbortRequest === undefined) {
-    const writer = stream._writer;
-    if (writer !== undefined) {
-      defaultWriterReadyPromiseResetToRejected(writer, reason);
-      writer._readyPromise.catch(() => {});
-    }
-  } else {
-    stream._pendingAbortRequest._reject(reason);
-    stream._pendingAbortRequest = undefined;
-  }
-
-  WritableStreamRejectClosedPromiseInReactionToError(stream);
+  WritableStreamError(stream, error);
+  WritableStreamRejectAbortRequestIfPending(stream);

ditto

-- 
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/705#pullrequestreview-29381747

Received on Tuesday, 28 March 2017 08:07:38 UTC