diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/baseline/bug842431-2.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/baseline/bug842431-2.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,25 @@ +// |jit-test| + +// If a frame's onPop handler throws, we should not call the +// onExceptionUnwind hook for that frame. +var g = newGlobal(); +var dbg = new Debugger(g); + +g.eval('function f() { var y; debugger; }'); + +dbg.onExceptionUnwind = function() { + assertEq(0, 1); +}; + +dbg.onDebuggerStatement = function handleDebugger(frame) { + frame.onPop = function(c) { + return {throw: 555}; + } +}; + +try { + g.f(); + assertEq(0, 2); +} catch(e) { + assertEq(e.toString().contains("555"), true); +}