summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Debugger-findObjects-06.js
blob: 2f8d5a11f68058c7412b0e28bdedca445c7dbd67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// In a debugger with multiple debuggees, findObjects finds objects from all debuggees.

var g1 = newGlobal({newCompartment: true});
var g2 = newGlobal({newCompartment: true});
var dbg = new Debugger();
var g1w = dbg.addDebuggee(g1);
var g2w = dbg.addDebuggee(g2);

g1.eval('this.a = {};');
g2.eval('this.b = {};');

var objects = dbg.findObjects();
assertEq(objects.indexOf(g1w.makeDebuggeeValue(g1.a)) != -1, true);
assertEq(objects.indexOf(g2w.makeDebuggeeValue(g2.b)) != -1, true);