blob: 8aebc4f1cf7a91d8350d47ed5155f3774658cdff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// The debugger may add new bindings into existing scopes
var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);
dbg.onDebuggerStatement = function(frame) {
assertEq(frame.eval("var x = 3; x").return, 3);
hits++;
}
var hits = 0;
g.eval("(function() { debugger; })()");
assertEq(hits, 1);
g.eval("(function() { var x = 4; debugger; })()");
assertEq(hits, 2);
|