summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Map-iterators-3.js
blob: d1aac03f846dc8c565c8670b39768a1745b24a05 (plain)
1
2
3
4
5
6
7
8
9
10
// A closed Map iterator does not visit new entries added after a clear().

load(libdir + "iteration.js");

var m = new Map();
var it = m[Symbol.iterator]();
assertIteratorDone(it, undefined);  // close the iterator
m.clear();
m.set("a", 1);
assertIteratorDone(it, undefined);  // iterator still closed