Re: [whatwg/streams] Factor out rejection handling logic from WritableStreamDefaultControllerProcessClose() (#640)

tyoshino commented on this pull request.



> @@ -188,7 +188,14 @@ function WritableStreamError(stream, e) {
 }
 
 function WritableStreamFinishClose(stream) {
-  assert(stream._state === 'closing' || stream._state === 'errored');
+  assert(stream._pendingCloseRequest !== undefined);
+  stream._pendingCloseRequest._resolve(undefined);
+  stream._pendingCloseRequest = undefined;
+
+  if (stream._pendingAbortRequest !== undefined) {

Oh, it's from L202 of the previous commit. I changed the order to make this and `WritableStreamFinishCloseWithError()` look similar. This reordering shouldn't cause any behavior change.

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

Received on Friday, 6 January 2017 11:25:39 UTC