summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-12.js
blob: ed1c4e5f6990d529007b57e57ee0beb34a726ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Test that disabling the debugger disables allocation tracking.

load(libdir + "asserts.js");

const dbg = new Debugger();
const root = newGlobal();
dbg.addDebuggee(root);

dbg.memory.trackingAllocationSites = true;
dbg.enabled = false;

root.eval("this.alloc = {}");

// We shouldn't accumulate allocations in our log while the debugger is
// disabled.
let allocs = dbg.memory.drainAllocationsLog();
assertEq(allocs.length, 0);