1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/Frame-eval-12.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,13 @@ 1.4 +// The arguments can escape from a function via a debugging hook. 1.5 + 1.6 +var g = newGlobal(); 1.7 +var dbg = new Debugger(g); 1.8 + 1.9 +// capture arguments object and test function 1.10 +dbg.onDebuggerStatement = function (frame) { 1.11 + var args = frame.older.environment.parent.getVariable('arguments'); 1.12 + assertEq(args.missingArguments, true); 1.13 +}; 1.14 +g.eval("function h() { debugger; }"); 1.15 +g.eval("function f() { var x = 0; return function() { x++; h() } }"); 1.16 +g.eval("f('ponies')()");