Skip to content

Commit

Permalink
remove controller argument
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Jun 10, 2023
1 parent 6ec5260 commit 1c65d61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5497,7 +5497,7 @@ dictionary Transformer {
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);
callback TransformerCancelCallback = Promise<undefined> (any reason);
</xmp>

<dl>
Expand Down Expand Up @@ -5560,7 +5560,7 @@ callback TransformerCancelCallback = Promise<undefined> (any reason, TransformSt
{{Transformer/flush|flush()}}; the stream is already in the process of successfully closing down,
and terminating it would be counterproductive.)

<dt><dfn dict-member for="Transformer" lt="cancel">cancel(<var ignore>reason</var>, <var ignore>controller</var>)</dfn></dt>
<dt><dfn dict-member for="Transformer" lt="cancel">cancel(<var ignore>reason</var>)</dfn></dt>
<dd>
<p>A function called when the [=writable side=] is aborted, or when the [=readable side=] is
cancelled.
Expand Down Expand Up @@ -5948,8 +5948,8 @@ The following abstract operations support the implementaiton of the
with argument list «&nbsp;|controller|&nbsp;» and [=callback this value=] |transformer|.
1. If |transformerDict|["{{Transformer/cancel}}"] [=map/exists=], set |cancelAlgorithm| to an
algorithm which takes an argument |reason| and returns the result of [=invoking=]
|transformerDict|["{{Transformer/cancel}}"] with argument list «&nbsp;|reason|,
|controller|&nbsp;» and [=callback this value=] |transformer|.
|transformerDict|["{{Transformer/cancel}}"] with argument list «&nbsp;|reason|&nbsp;» and
[=callback this value=] |transformer|.
1. Perform ! [$SetUpTransformStreamDefaultController$](|stream|, |controller|,
|transformAlgorithm|, |flushAlgorithm|, |cancelAlgorithm|).
</div>
Expand Down
2 changes: 1 addition & 1 deletion reference-implementation/lib/Transformer.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ dictionary Transformer {
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);
callback TransformerCancelCallback = Promise<undefined> (any reason);
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function SetUpTransformStreamDefaultControllerFromTransformer(stream, transforme
flushAlgorithm = () => transformerDict.flush.call(transformer, controller);
}
if ('cancel' in transformerDict) {
cancelAlgorithm = reason => transformerDict.cancel.call(transformer, reason, controller);
cancelAlgorithm = reason => transformerDict.cancel.call(transformer, reason);
}

SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm, cancelAlgorithm);
Expand Down

0 comments on commit 1c65d61

Please sign in to comment.