paulmillr/es6-shim — pull request #184 by cscott (2014-01-15 21:58:36+00:00)
Title: Fix Map/Set iteration after delete.

Back up off of a deleted list element before continuing the iteration.
This ensures that newly added elements don't get skipped (because the
deleted element has a stale 'next' pointer).

Also reimplement Map.forEach() in terms of Map.entries(), ensuring that
we don't have to keep multiple iteration routines in sync.

Finally, add tests for Set that parallel the mutation-during-iteration
tests for Map, ensuring that this problem stays fixed in the future
for both Map and Set.

Closes: #183