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

@domenic approved this pull request.

Found a few editorial nits, but looks good! Thanks so much for working on this.

As you may or may not be aware, because of the reference implementation landing things in the streams repo is a bit annoying. First we have to land the tests PR, then we roll the submodule, then we land this PR. I'll go merge the tests PR now.

> @@ -5726,6 +5747,16 @@ the following table:
    <th>Internal Slot</th>
    <th>Description (<em>non-normative</em>)</th>
  <tbody>
+  <tr>
+   <td><dfn>\[[cancelAlgorithm]]</dfn>
+   <td class="non-normative">A promise-returning algorithm, taking one argument (the [=reason=] for

```suggestion
   <td class="non-normative">A promise-returning algorithm, taking one argument (the reason for
```

> @@ -6062,6 +6132,36 @@ side=] of [=transform streams=].
  1. Return |stream|.[=TransformStream/[[backpressureChangePromise]]=].
 </div>
 
+
+<div algorithm>
+ <dfn abstract-op lt="TransformStreamDefaultSourceCancelAlgorithm"
+ id="transform-stream-default-source-cancel">TransformStreamDefaultSourceCancelAlgorithm(|stream|,
+ |reason|)</dfn> performs the following steps:

Reorder to be alphabetically before the previous one

> @@ -7106,9 +7206,10 @@ reason.
 <div algorithm="create a TransformStream">
  To <dfn export for="TransformStream" lt="set up|setting up">set up</dfn> a
  newly-[=new|created-via-Web IDL=] {{TransformStream}} |stream| given an algorithm <dfn export
- for="TransformStream/set up"><var>transformAlgorithm</var></dfn> and an optional algorithm <dfn
- export for="TransformStream/set up"><var>flushAlgorithm</var></dfn>, perform the following steps.
- |transformAlgorithm| and, if given, |flushAlgorithm|, may return a promise.
+ for="TransformStream/set up"><var>transformAlgorithm</var></dfn>, an optional algorithm <dfn
+ export for="TransformStream/set up"><var>flushAlgorithm</var></dfn>, and an optional algorithm <dfn
+ export for="TransformStream/set up"><var>cancelAlgorithm</var></dfn>, perform the following steps.
+ |transformAlgorithm|, if given, |flushAlgorithm| and |cancelAlgorithm|, may return a promise.

```suggestion
 |transformAlgorithm| and, if given, |flushAlgorithm| and |cancelAlgorithm|, may return a promise.
```

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

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

Received on Friday, 29 September 2023 04:52:21 UTC