Skip to content

Commit b0fc04d

Browse files
authored
Plumb reason through abort and cancel algorithm wrappers
Fixes #1241; fixes #1273; closes #1275.
1 parent 8d62dd2 commit b0fc04d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

index.bs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6895,9 +6895,10 @@ to grow organically as needed.
68956895
otherwise. If this throws an exception |e|, return [=a promise rejected with=] |e|.
68966896
1. If |result| is a {{Promise}}, then return |result|.
68976897
1. Return [=a promise resolved with=] undefined.
6898-
1. Let |cancelAlgorithmWrapper| be an algorithm that runs these steps:
6899-
1. Let |result| be the result of running |cancelAlgorithm|, if |cancelAlgorithm| was given, or
6900-
null otherwise. If this throws an exception |e|, return [=a promise rejected with=] |e|.
6898+
1. Let |cancelAlgorithmWrapper| be an algorithm that runs these steps given |reason|:
6899+
1. Let |result| be the result of running |cancelAlgorithm| given |reason|, if |cancelAlgorithm|
6900+
was given, or null otherwise. If this throws an exception |e|, return
6901+
[=a promise rejected with=] |e|.
69016902
1. If |result| is a {{Promise}}, then return |result|.
69026903
1. Return [=a promise resolved with=] undefined.
69036904
1. If |sizeAlgorithm| was not given, then set it to an algorithm that returns 1.
@@ -7218,9 +7219,10 @@ for="ReadableStream">locked</dfn> if ! [$IsReadableStreamLocked$](|stream|) retu
72187219
null otherwise. If this throws an exception |e|, return [=a promise rejected with=] |e|.
72197220
1. If |result| is a {{Promise}}, then return |result|.
72207221
1. Return [=a promise resolved with=] undefined.
7221-
1. Let |abortAlgorithmWrapper| be an algorithm that runs these steps:
7222-
1. Let |result| be the result of running |abortAlgorithm|, if |abortAlgorithm| was given, or
7223-
null otherwise. If this throws an exception |e|, return [=a promise rejected with=] |e|.
7222+
1. Let |abortAlgorithmWrapper| be an algorithm that runs these steps given |reason|:
7223+
1. Let |result| be the result of running |abortAlgorithm| given |reason|, if |abortAlgorithm| was
7224+
given, or null otherwise. If this throws an exception |e|, return [=a promise rejected with=]
7225+
|e|.
72247226
1. If |result| is a {{Promise}}, then return |result|.
72257227
1. Return [=a promise resolved with=] undefined.
72267228
1. If |sizeAlgorithm| was not given, then set it to an algorithm that returns 1.
@@ -8314,6 +8316,7 @@ James Pryor,
83148316
Janessa Det,
83158317
Jason Orendorff,
83168318
Jeffrey Yasskin,
8319+
Jeremy Roman,
83178320
Jens Nockert,
83188321
Lennart Grahl,
83198322
Luca Casonato,

0 commit comments

Comments
 (0)