summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-eval-27.js
blob: 4c7d5fb0258f844a341417a5cf4a18e1eccdcf8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Bug 1026477: Defining functions with D.F.p.eval works, even if there's
// already a var binding for the identifier.

var g = newGlobal();
var dbg = new Debugger(g);
dbg.onDebuggerStatement = function (frame) {
  frame.eval('function f() { }');
};

// When the compiler sees the 'debugger' statement, it marks all variables as
// aliased, so f will live in a Call object.
assertEq(typeof g.eval('(function () { var f = 42; debugger; return f;})();'),
         "function");