blob: fff4666cce6dd8277a6bc0c1ace9ce595f7ba473 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Test that we don't get allocation sites when nobody has asked for them.
const root = newGlobal();
const dbg = new Debugger();
const wrappedRoot = dbg.addDebuggee(root);
dbg.memory.trackingAllocationSites = true;
root.eval("this.obj = {};");
dbg.memory.trackingAllocationSites = false;
root.eval("this.obj2 = {};");
let wrappedObj = wrappedRoot.makeDebuggeeValue(root.obj);
let allocationSite = wrappedObj.allocationSite;
assertEq(allocationSite != null && typeof allocationSite == "object", true);
let wrappedObj2 = wrappedRoot.makeDebuggeeValue(root.obj2);
let allocationSite2 = wrappedObj2.allocationSite;
assertEq(allocationSite2, null);
|