summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/WeakMap-moving-gc.js
blob: 1bb29428b8701cbb55df947bc506ab2901bd3cef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
var wm = new WeakMap;
var A = [];
for (var i = 0; i < 1024; ++i) {
    var key = {i:i};
    wm.set(key, i);
    A.push(key);
}
gc();
for (var i in A) {
    var key = A[i];
    assertEq(wm.has(key), true);
}