1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/Frame-eval-11.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,15 @@ 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 +var hits = 0; 1.11 +dbg.onDebuggerStatement = function (frame) { 1.12 + assertEq(frame.older.eval('arguments[0]').return, 'ponies'); 1.13 + hits++; 1.14 +}; 1.15 +g.eval("function g() { debugger; }"); 1.16 +g.eval("function f() { g(); }"); 1.17 +g.eval("f('ponies')"); 1.18 +assertEq(hits, 1);