Re: [whatwg/streams] Detect if the TransformStream errored inside write() and reject (#799)

ricea commented on this pull request.



> @@ -318,7 +318,12 @@ class TransformStreamDefaultSink {
 
     if (transformStream._backpressure === true) {
       return transformStream._backpressureChangePromise
-          .then(() => TransformStreamTransform(transformStream, chunk));
+          .then(() => {
+            if (transformStream._errored === true) {
+              return Promise.reject(transformStream._storedError);

It will be easier to do as one big cleanup in a separate pass, so if you don't mind I will do that. I have filed https://github.com/whatwg/streams/issues/804 to track this.

-- 
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/799#discussion_r140467515

Received on Friday, 22 September 2017 11:08:51 UTC