blob: 2406c3d550031bcbb65e07caf8c03116f0eb44e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// The .name of a non-function object is undefined.
var g = newGlobal();
var hits = 0;
var dbg = new Debugger(g);
dbg.onDebuggerStatement = function (frame) {
assertEq(frame.arguments[0].name, undefined);
hits++;
};
g.eval("function f(nonfunction) { debugger; }");
g.eval("f({});");
g.eval("f(/a*/);");
g.eval("f({name: 'bad'});");
g.eval("f(new Proxy({}, {}));");
assertEq(hits, 4);
|