Skip to content

Commit

Permalink
Call Subscriber's next method for async iterators (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino authored Feb 28, 2025
1 parent 5e4a6a5 commit bebe10d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,14 @@ An <dfn>internal observer</dfn> is a [=struct=] with the following [=struct/item
1. If |done|'s \[[Value]] is true, then run |subscriber|'s {{Subscriber/complete()}}
and abort these steps.

1. Run |nextAlgorithm|.
1. Let |value| be [$IteratorValue$](|iteratorResult|).

1. If |value| is a [=throw completion=], then run |subscriber|'s
{{Subscriber/error()}} method with |value|'s \[[Value]] and abort these steps.

1. Run |subscriber|'s {{Subscriber/next()}} given |value|'s \[[Value]].

1. Run |nextAlgorithm| given |subscriber| and |iteratorRecord|.

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

0 comments on commit bebe10d

Please sign in to comment.