blob: be9016a07c888a1bbd9952181cedb8723553365b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
var g = newGlobal({newCompartment: true});
g.eval("function f(...x) {}");
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
var fw = gw.getOwnPropertyDescriptor("f").value;
assertEq(fw.parameterNames.toString(), "x");
var g = newGlobal({newCompartment: true});
g.eval("function f(...rest) { debugger; }");
var dbg = Debugger(g);
dbg.onDebuggerStatement = function (frame) {
frame.eval("args = arguments");
};
g.f(9, 8, 7);
assertEq(g.args.length, 3);
assertEq(g.args[2], 7);
|