1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-03.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,16 @@ 1.4 +// arguments works in evalWithBindings (it does not interpose a function scope) 1.5 +var g = newGlobal(); 1.6 +var dbg = new Debugger; 1.7 +var global = dbg.addDebuggee(g); 1.8 +var hits = 0; 1.9 +dbg.onDebuggerStatement = function (frame) { 1.10 + var argc = frame.arguments.length; 1.11 + assertEq(argc, 7); 1.12 + assertEq(frame.evalWithBindings("arguments[prop]", {prop: "length"}).return, argc); 1.13 + for (var i = 0; i < argc; i++) 1.14 + assertEq(frame.evalWithBindings("arguments[i]", {i: i}).return, frame.arguments[i]); 1.15 + hits++; 1.16 +}; 1.17 +g.eval("function f() { debugger; }"); 1.18 +g.eval("f(undefined, -0, NaN, '\uffff', Array.prototype, Math, f);"); 1.19 +assertEq(hits, 1);