1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/baseline/bug842431-2.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,25 @@ 1.4 +// |jit-test| 1.5 + 1.6 +// If a frame's onPop handler throws, we should not call the 1.7 +// onExceptionUnwind hook for that frame. 1.8 +var g = newGlobal(); 1.9 +var dbg = new Debugger(g); 1.10 + 1.11 +g.eval('function f() { var y; debugger; }'); 1.12 + 1.13 +dbg.onExceptionUnwind = function() { 1.14 + assertEq(0, 1); 1.15 +}; 1.16 + 1.17 +dbg.onDebuggerStatement = function handleDebugger(frame) { 1.18 + frame.onPop = function(c) { 1.19 + return {throw: 555}; 1.20 + } 1.21 +}; 1.22 + 1.23 +try { 1.24 + g.f(); 1.25 + assertEq(0, 2); 1.26 +} catch(e) { 1.27 + assertEq(e.toString().contains("555"), true); 1.28 +}