Skip to content

Commit

Permalink
Plumb reason through abort and cancel algorithm wrappers
Browse files Browse the repository at this point in the history
Fixes #1241; fixes #1273; closes #1275.
  • Loading branch information
jeremyroman committed Jan 10, 2024
1 parent 8d62dd2 commit b0fc04d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6895,9 +6895,10 @@ to grow organically as needed.
otherwise. If this throws an exception |e|, return [=a promise rejected with=] |e|.
1. If |result| is a {{Promise}}, then return |result|.
1. Return [=a promise resolved with=] undefined.
1. Let |cancelAlgorithmWrapper| be an algorithm that runs these steps:
1. Let |result| be the result of running |cancelAlgorithm|, if |cancelAlgorithm| was given, or
null otherwise. If this throws an exception |e|, return [=a promise rejected with=] |e|.
1. Let |cancelAlgorithmWrapper| be an algorithm that runs these steps given |reason|:
1. Let |result| be the result of running |cancelAlgorithm| given |reason|, if |cancelAlgorithm|
was given, or null otherwise. If this throws an exception |e|, return
[=a promise rejected with=] |e|.
1. If |result| is a {{Promise}}, then return |result|.
1. Return [=a promise resolved with=] undefined.
1. If |sizeAlgorithm| was not given, then set it to an algorithm that returns 1.
Expand Down Expand Up @@ -7218,9 +7219,10 @@ for="ReadableStream">locked</dfn> if ! [$IsReadableStreamLocked$](|stream|) retu
null otherwise. If this throws an exception |e|, return [=a promise rejected with=] |e|.
1. If |result| is a {{Promise}}, then return |result|.
1. Return [=a promise resolved with=] undefined.
1. Let |abortAlgorithmWrapper| be an algorithm that runs these steps:
1. Let |result| be the result of running |abortAlgorithm|, if |abortAlgorithm| was given, or
null otherwise. If this throws an exception |e|, return [=a promise rejected with=] |e|.
1. Let |abortAlgorithmWrapper| be an algorithm that runs these steps given |reason|:
1. Let |result| be the result of running |abortAlgorithm| given |reason|, if |abortAlgorithm| was
given, or null otherwise. If this throws an exception |e|, return [=a promise rejected with=]
|e|.
1. If |result| is a {{Promise}}, then return |result|.
1. Return [=a promise resolved with=] undefined.
1. If |sizeAlgorithm| was not given, then set it to an algorithm that returns 1.
Expand Down Expand Up @@ -8314,6 +8316,7 @@ James Pryor,
Janessa Det,
Jason Orendorff,
Jeffrey Yasskin,
Jeremy Roman,
Jens Nockert,
Lennart Grahl,
Luca Casonato,
Expand Down

0 comments on commit b0fc04d

Please sign in to comment.