diff --git a/index.bs b/index.bs index e8ef8bb4..083942ba 100644 --- a/index.bs +++ b/index.bs @@ -8162,9 +8162,9 @@ Note: Instead of returning an async iterable from an IDL operation, the operatio
- To finish iterating an + To close an async iterable<T> |iteratorRecord|, - perform the following steps: + with a reason |reason|, perform the following steps: 1. Let |iterator| be |iteratorRecord|.\[[Iterator]]. 1. Let |returnMethod| be GetMethod(|iterator|, "return"). @@ -8172,7 +8172,7 @@ Note: Instead of returning an async iterable from an IDL operation, the operatio |returnMethod|.\[[Value]]. 1. If |returnMethod| is undefined, return [=a promise resolved with=] undefined. - 1. Let |returnResult| be Call(|returnMethod|.\[[Value]], |iterator|). + 1. Let |returnResult| be Call(|returnMethod|.\[[Value]], |iterator|, « |reason| »). 1. If |returnResult| is an abrupt completion, return [=a promise rejected with=] |returnResult|.\[[Value]]. 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 concatN is an [=operation=] that returns a promise that will be fulfilled with the concatenation of all the strings yielded by the async iterable passed to it. It stops - concatenating and finishes the iterator once the async iterable has yielded N strings. + concatenating and closes the iterator once the async iterable has yielded N strings.
         interface I {
@@ -8211,7 +8211,8 @@ Note: Instead of returning an async iterable from an IDL operation, the operatio
                 1.  Set |result| to the result of concatenating |result| and |v|.
                 1.  Set |n| to |n| + 1.
                 1.  If |n| is |maxN|, then:
-                    1.  Let |finish| be the result of finishing iterating |iterable|.
+                    1.  Let |finish| be the result of closing
+                        |iterable| with reason undefined.
                     1.  [=React=] to |finish|:
                         -   If |finish| was fulfilled, [=resolve=] |promise| with |result|.
                         -   If |finish| was rejected with reason |r|, [=reject=] |promise| with |r|.