summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-02.js
blob: e9d56bf103985867cbc7f00906487ea2d35af624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Test that drainAllocationsLog fails when we aren't trackingAllocationSites.

load(libdir + 'asserts.js');

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

dbg.memory.trackingAllocationSites = true;
root.eval("this.alloc1 = {}");
dbg.memory.trackingAllocationSites = false;
root.eval("this.alloc2 = {};");

assertThrowsInstanceOf(() => dbg.memory.drainAllocationsLog(),
                       Error);