summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1293127.js
blob: 195798bf76111dd4474e9e70c92fb076f79e5092 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Test that we can create 700 cross compartment wrappers to nursery objects
// without triggering a minor GC.
gczeal(0);
let g = newGlobal({newCompartment: true});
evalcx("function f(x) { return {x: x}; }", g);
gc();
let initial = gcparam("gcNumber");
for (let i = 0; i < 700; i++)
    g.f(i);
let final = gcparam("gcNumber");
assertEq(final, initial);