Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransformStream cleanup using "Transformer.cancel" #1283

Merged
merged 15 commits into from
Sep 30, 2023
Prev Previous commit
Next Next commit
editorial fixes
  • Loading branch information
lucacasonato committed Sep 29, 2023
commit 16900ad719f1888d6c239549a30f81c845f2acef
27 changes: 13 additions & 14 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5749,7 +5749,7 @@ the following table:
<tbody>
<tr>
<td><dfn>\[[cancelAlgorithm]]</dfn>
<td class="non-normative">A promise-returning algorithm, taking one argument (the [=reason=] for
<td class="non-normative">A promise-returning algorithm, taking one argument (the reason for
cancellation), which communicates a requested cancellation to the [=transformer=]
<tr>
<td><dfn>\[[finishPromise]]</dfn>
Expand Down Expand Up @@ -6121,18 +6121,6 @@ side=] of [=transform streams=].
The following abstract operation is used to implement the [=underlying source=] for the [=readable
side=] of [=transform streams=].

<div algorithm>
<dfn abstract-op lt="TransformStreamDefaultSourcePullAlgorithm"
id="transform-stream-default-source-pull">TransformStreamDefaultSourcePullAlgorithm(|stream|)</dfn>
performs the following steps:

1. Assert: |stream|.[=TransformStream/[[backpressure]]=] is true.
1. Assert: |stream|.[=TransformStream/[[backpressureChangePromise]]=] is not undefined.
1. Perform ! [$TransformStreamSetBackpressure$](|stream|, false).
1. Return |stream|.[=TransformStream/[[backpressureChangePromise]]=].
</div>


<div algorithm>
<dfn abstract-op lt="TransformStreamDefaultSourceCancelAlgorithm"
id="transform-stream-default-source-cancel">TransformStreamDefaultSourceCancelAlgorithm(|stream|,
Expand Down Expand Up @@ -6162,6 +6150,17 @@ side=] of [=transform streams=].
1. Return |controller|.[=TransformStreamDefaultController/[[finishPromise]]=].
</div>

<div algorithm>
<dfn abstract-op lt="TransformStreamDefaultSourcePullAlgorithm"
id="transform-stream-default-source-pull">TransformStreamDefaultSourcePullAlgorithm(|stream|)</dfn>
performs the following steps:

1. Assert: |stream|.[=TransformStream/[[backpressure]]=] is true.
1. Assert: |stream|.[=TransformStream/[[backpressureChangePromise]]=] is not undefined.
1. Perform ! [$TransformStreamSetBackpressure$](|stream|, false).
1. Return |stream|.[=TransformStream/[[backpressureChangePromise]]=].
</div>

<h2 id="qs">Queuing strategies</h2>

<h3 id="qs-api">The queuing strategy API</h3>
Expand Down Expand Up @@ -7209,7 +7208,7 @@ reason.
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.
|transformAlgorithm| and, if given, |flushAlgorithm| and |cancelAlgorithm|, may return a promise.

1. Let |writableHighWaterMark| be 1.
1. Let |writableSizeAlgorithm| be an algorithm that returns 1.
Expand Down
Loading