summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Debugger-findScripts-16.js
blob: 92b8176cc62b3d1cdfe6d26b9555f1f8ad2ce703 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Bug 744731 - findScripts() finds active debugger executeInGlobal scripts.

var g = newGlobal();
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
var hits = 0;
dbg.onDebuggerStatement = function (frame) {
    hits++;
    assertEq(dbg.findScripts().indexOf(dbg.getNewestFrame().script) !== -1, true);
};
gw.executeInGlobal("debugger;");
assertEq(hits, 1);