1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/Frame-arguments-05.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,19 @@ 1.4 +// frame.arguments is "live" (it reflects assignments to arguments). 1.5 + 1.6 +var g = newGlobal(); 1.7 +var dbg = new Debugger(g); 1.8 +var log = ''; 1.9 +var args; 1.10 +dbg.onDebuggerStatement = function (frame) { 1.11 + if (args === undefined) 1.12 + args = frame.arguments; 1.13 + else 1.14 + assertEq(frame.arguments, args); 1.15 + log += args[0]; 1.16 + assertEq(frame.eval("x = '0';").return, '0'); 1.17 + log += args[0]; 1.18 +}; 1.19 + 1.20 +g.eval("function f(x) { x = '2'; debugger; x = '3'; debugger; }"); 1.21 +g.f("1"); 1.22 +assertEq(log, "2030");