blob: 3eb6a97bb63f6338c4d240547c443f59ce88bfe5 [file] [log] [blame]
// Test doing a GC while we have a non-empty log.
const root = newGlobal();
const dbg = new Debugger();
dbg.addDebuggee(root)
dbg.memory.trackingAllocationSites = true;
root.eval("(" + function immediate() {
this.tests = [
({}),
[],
/(two|2)\s*problems/,
new function Ctor(){},
new Object(),
new Array(),
new Date(),
];
} + "());");
gc();
const allocs = dbg.memory.drainAllocationsLog();
assertEq(allocs.length >= root.tests.length, true);