summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-name-01.js
blob: eb68b019bcadc8ecdf7b911ac4c00a8c22ec9fc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Debugger.Object.prototype.name

var g = newGlobal();
var dbg = Debugger(g);
var name;
dbg.onDebuggerStatement = function (frame) { name = frame.callee.name; };

g.eval("(function f() { debugger; })();");
assertEq(name, "f");
g.eval("(function () { debugger; })();");
assertEq(name, undefined);
g.eval("Function('debugger;')();");
assertEq(name, "anonymous");