summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-eval-13.js
blob: 54a90885cf20d22f130aec60a6076915a8ba53fe (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();
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);