summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/test-root-arrays.js
blob: 2c6015f19c7d6ea786cceac050ab942ad7c0eb26 (plain)
1
2
3
4
5
6
7
8
9
10
gczeal(0);
let objects = [{}, {}, {}];
blackRoot()[0] = objects[0];
grayRoot()[0] = objects[1];
addMarkObservers(objects);
objects = undefined;
gc();
assertEq(getMarks()[0], "black");
assertEq(getMarks()[1], "gray");
assertEq(getMarks()[2], "dead");