blob: 3eb6a97bb63f6338c4d240547c443f59ce88bfe5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// 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);
|