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

Commit

Permalink
Normative: close keys iterators in early exits (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot authored Jan 11, 2023
1 parent 1c2d601 commit 29e3436
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ <h1>Set.prototype.isSupersetOf ( _other_ )</h1>
1. Set _next_ to ? IteratorStep(_keysIter_).
1. If _next_ is not *false*, then
1. Let _nextValue_ be ? IteratorValue(_next_).
1. If SetDataHas(_O_.[[SetData]], _nextValue_) is *false*, return *false*.
1. If SetDataHas(_O_.[[SetData]], _nextValue_) is *false*, then
1. Perform ? IteratorClose(_keysIter_, NormalCompletion(~unused~)).
1. Return *false*.
1. Return *true*.
</emu-alg>
</emu-clause>
Expand All @@ -182,7 +184,9 @@ <h1>Set.prototype.isDisjointFrom ( _other_ )</h1>
1. Set _next_ to ? IteratorStep(_keysIter_).
1. If _next_ is not *false*, then
1. Let _nextValue_ be ? IteratorValue(_next_).
1. If SetDataHas(_O_.[[SetData]], _nextValue_) is *true*, return *false*.
1. If SetDataHas(_O_.[[SetData]], _nextValue_) is *true*, then
1. Perform ? IteratorClose(_keysIter_, NormalCompletion(~unused~)).
1. Return *false*.
1. Return *true*.
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit 29e3436

Please sign in to comment.