summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Debugger-findScripts-06.js
blob: 129aa4842365138579a5aa56592b5aa525bb85e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// In a debugger with multiple debuggees, findScripts finds scripts across 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('function f() {}');
g2.eval('function g() {}');

var scripts = dbg.findScripts();
assertEq(scripts.indexOf(g1w.makeDebuggeeValue(g1.f).script) != -1, true);
assertEq(scripts.indexOf(g2w.makeDebuggeeValue(g2.g).script) != -1, true);