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

tyoshino commented on this pull request.



>        defaultWriterClosedPromiseInitializeAsResolved(this);
     } else {
       assert(state === 'errored', 'state must be errored');
 
-      defaultWriterClosedPromiseInitializeAsRejected(this, stream._storedError);
+      const storedError = stream._storedError;
+      // TODO(tyoshino): Get consensus on this behavior i.e. readyPromise rejection reason may differ between
+      // release.

OK. I'll remove it.

>      1. Return.
   1. <a>Resolve</a> _stream_.[[pendingAbortRequest]] with *undefined*.
   1. Set _stream_.[[pendingAbortRequest]] to *undefined*.
+  1. Let _error_ to a new *TypeError* indicating that the stream was closed successfully after abort request.

I rephrased this because I thought it's better to clarify that the requested abort() became pending and the abort() was aborted eventually.

I understand that this is still not much clear. I'll rephrase it again.

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

Received on Thursday, 9 March 2017 03:25:47 UTC