Re: [whatwg/streams] TransformStream cleanup using "Transformer.cancel" (PR #1283)

@MattiasBuelens commented on this pull request.



>    any readableType;
   any writableType;
 };
 
 callback TransformerStartCallback = any (TransformStreamDefaultController controller);
 callback TransformerFlushCallback = Promise<undefined> (TransformStreamDefaultController controller);
 callback TransformerTransformCallback = Promise<undefined> (any chunk, TransformStreamDefaultController controller);
+callback TransformerCancelCallback = Promise<undefined> (any reason, TransformStreamDefaultController controller);

Remove the `controller` argument. Both readable and writable sides have already transitioned to a final state by the time we call `cancel()`, so you can no longer use the controller for anything useful.

Also, this aligns with ReadableStream's `cancel()` algorithm and WritableStream's `abort()` algorithm.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1283#pullrequestreview-1471705397
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/pull/1283/review/1471705397@github.com>

Received on Friday, 9 June 2023 10:46:35 UTC