@@ -8162,17 +8162,17 @@ Note: Instead of returning an async iterable from an IDL operation, the operatio
81628162
81638163<div algorithm>
81648164
8165- To <dfn id="async-iterable-finish-iterating " export lt="finish iterating an async iterable">finish iterating </dfn> an
8165+ To <dfn id="async-iterable-close " export lt="close an async iterable">close </dfn> an
81668166 <code><a lt="async iterable type">async iterable<<var ignore>T</var>></a></code> |iteratorRecord|,
8167- perform the following steps:
8167+ with a reason |reason|, perform the following steps:
81688168
81698169 1. Let |iterator| be |iteratorRecord|.\[[Iterator]].
81708170 1. Let |returnMethod| be <a abstract-op>GetMethod</a>(|iterator|, "return").
81718171 1. If |returnMethod| is an abrupt completion, return [=a promise rejected with=]
81728172 |returnMethod|.\[[Value]].
81738173 1. If |returnMethod| is <emu-val>undefined</emu-val>, return [=a promise resolved with=]
81748174 <emu-val>undefined</emu-val>.
8175- 1. Let |returnResult| be <a abstract-op>Call</a>(|returnMethod|.\[[Value]], |iterator|).
8175+ 1. Let |returnResult| be <a abstract-op>Call</a>(|returnMethod|.\[[Value]], |iterator|, « |reason| » ).
81768176 1. If |returnResult| is an abrupt completion, return [=a promise rejected with=]
81778177 |returnResult|.\[[Value]].
81788178 1. Let |returnPromise| be [=a promise resolved with=] |returnResult|.\[[Value]].
@@ -8188,7 +8188,7 @@ Note: Instead of returning an async iterable from an IDL operation, the operatio
81888188
81898189 <code>concatN</code> is an [=operation=] that returns a promise that will be fulfilled with the
81908190 concatenation of all the strings yielded by the async iterable passed to it. It stops
8191- concatenating and finishes the iterator once the async iterable has yielded N strings.
8191+ concatenating and closes the iterator once the async iterable has yielded N strings.
81928192
81938193 <pre>
81948194 interface I {
@@ -8211,7 +8211,8 @@ Note: Instead of returning an async iterable from an IDL operation, the operatio
82118211 1. Set |result| to the result of concatenating |result| and |v|.
82128212 1. Set |n| to |n| + 1.
82138213 1. If |n| is |maxN|, then:
8214- 1. Let |finish| be the result of <a lt="finish iterating an async iterable">finishing iterating</a> |iterable|.
8214+ 1. Let |finish| be the result of <a lt="close an async iterable">closing</a>
8215+ |iterable| with reason <emu-val>undefined</emu-val>.
82158216 1. [=React=] to |finish|:
82168217 - If |finish| was fulfilled, [=resolve=] |promise| with |result|.
82178218 - If |finish| was rejected with reason |r|, [=reject=] |promise| with |r|.
0 commit comments