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