Skip to content

Commit bebe10d

Browse files
authored
Call Subscriber's next method for async iterators (#202)
1 parent 5e4a6a5 commit bebe10d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spec.bs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,14 @@ An <dfn>internal observer</dfn> is a [=struct=] with the following [=struct/item
548548
1. If |done|'s \[[Value]] is true, then run |subscriber|'s {{Subscriber/complete()}}
549549
and abort these steps.
550550

551-
1. Run |nextAlgorithm|.
551+
1. Let |value| be [$IteratorValue$](|iteratorResult|).
552+
553+
1. If |value| is a [=throw completion=], then run |subscriber|'s
554+
{{Subscriber/error()}} method with |value|'s \[[Value]] and abort these steps.
555+
556+
1. Run |subscriber|'s {{Subscriber/next()}} given |value|'s \[[Value]].
557+
558+
1. Run |nextAlgorithm| given |subscriber| and |iteratorRecord|.
552559

553560
* If |nextPromise| was rejected with reason |r|, then run |subscriber|'s
554561
{{Subscriber/error()}} method given |r|.

0 commit comments

Comments
 (0)