Re: [whatwg/streams] make TransformStream respect backpressure (#550)

tyoshino commented on this pull request.



> -    assert(transformStream._chunkPending === false);
-    assert(transformStream._chunk === undefined);
-
-    assert(transformStream._resolveWrite === undefined);
-
-    transformStream._chunkPending = true;
-    transformStream._chunk = chunk;
-
-    const promise = new Promise(resolve => {
-      transformStream._resolveWrite = resolve;
-    });
-
-    TransformStreamTransformIfNeeded(transformStream);
-
-    return promise;
+    return TransformStreamTransform(transformStream, chunk);

This is great that we're utilizing the WritableStream's queue than having _chunk and _chunkPending.

-- 
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/550#pullrequestreview-5810043

Received on Wednesday, 26 October 2016 09:44:15 UTC