Re: [whatwg/streams] Factor out readyPromiseIsPending calculation (#671)

tyoshino commented on this pull request.



> @@ -2683,6 +2683,7 @@ WritableStream(<var>underlyingSink</var> = {}, { <var>size</var>, <var>highWater
      potential types in the future, without backward-compatibility concerns.</p>
   1. Set *this*.[[writableStreamController]] to ? Construct(`<a idl>WritableStreamDefaultController</a>`, « *this*,
      _underlyingSink_, _size_, _highWaterMark_ »).
+  1. Return ? WritableStreamDefaultControllerStart(*this*.[[writableStreamController]]).

Please see the following sentence in the OP. This is not for code reduction or operation exporting, but to set _writableStreamController before we call user defined methods to which we pass the created controller. IIUC, the criteria is for judging whether or not to do a change that doesn't change the meaning of the code.

> There's similar hack at the bottom of WritableStreamDefaultControllerError() though it seems no longer working (before c6c0a6e, it was placed in WritableStreamError() and retrieving the controller from the stream instance, and therefore had the same issue). Rather than getting bothered by these corner case handling now and in the future, this patch lets the stream finish instantiation of a controller and then invoke sink.start().

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

Received on Thursday, 26 January 2017 05:34:06 UTC