summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Debugger-findScripts-06.js
blob: 0b49ce32474f0a55a96da8bb294693fca6d7787d (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();
var g2 = newGlobal();
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);