Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Commit c53868c

Browse files
committed
Normative: close keys iterators in early exits
1 parent 1c2d601 commit c53868c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

spec/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ <h1>Set.prototype.isSupersetOf ( _other_ )</h1>
157157
1. Set _next_ to ? IteratorStep(_keysIter_).
158158
1. If _next_ is not *false*, then
159159
1. Let _nextValue_ be ? IteratorValue(_next_).
160-
1. If SetDataHas(_O_.[[SetData]], _nextValue_) is *false*, return *false*.
160+
1. If SetDataHas(_O_.[[SetData]], _nextValue_) is *false*, then
161+
1. Perform ? IteratorClose(_keysIter_, NormalCompletion(~unused~)).
162+
1. Return *false*.
161163
1. Return *true*.
162164
</emu-alg>
163165
</emu-clause>
@@ -182,7 +184,9 @@ <h1>Set.prototype.isDisjointFrom ( _other_ )</h1>
182184
1. Set _next_ to ? IteratorStep(_keysIter_).
183185
1. If _next_ is not *false*, then
184186
1. Let _nextValue_ be ? IteratorValue(_next_).
185-
1. If SetDataHas(_O_.[[SetData]], _nextValue_) is *true*, return *false*.
187+
1. If SetDataHas(_O_.[[SetData]], _nextValue_) is *true*, then
188+
1. Perform ? IteratorClose(_keysIter_, NormalCompletion(~unused~)).
189+
1. Return *false*.
186190
1. Return *true*.
187191
</emu-alg>
188192
</emu-clause>

0 commit comments

Comments
 (0)