1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-07.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +// Unwinding due to uncatchable errors does not trigger onExceptionUnwind. 1.5 + 1.6 +var g = newGlobal(); 1.7 +var dbg = Debugger(g); 1.8 +var hits = 0; 1.9 +dbg.onExceptionUnwind = function (frame, value) { hits = 'BAD'; }; 1.10 +dbg.onDebuggerStatement = function (frame) { 1.11 + if (hits++ === 0) 1.12 + assertEq(frame.eval("debugger;"), null); 1.13 + else 1.14 + return null; 1.15 +} 1.16 + 1.17 +assertEq(g.eval("debugger; 2"), 2); 1.18 +assertEq(hits, 2);