Re: [whatwg/streams] Execute strategySize first in write() (#680)

domenic approved this pull request.

LGTM with nit

> @@ -656,6 +650,18 @@ function WritableStreamDefaultWriterWrite(writer, chunk) {
 
   assert(stream !== undefined);
 
+  const controller = stream._writableStreamController;
+
+  const chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk);
+
+  if (stream !== writer._ownerWritableStream) {
+    return Promise.reject(defaultWriterLockException('write to'));
+  }
+
+  if (stream._state === 'closing') {

I guess this could be consolidated with line 666.

-- 
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/680#pullrequestreview-21628210

Received on Monday, 13 February 2017 22:09:47 UTC