diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/debug/onExceptionUnwind-04.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-04.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,17 @@ +// onExceptionUnwind is not called for exceptions thrown and handled in the debugger. +var g = newGlobal(); +var dbg = Debugger(g); +g.log = ''; +dbg.onDebuggerStatement = function (frame) { + try { + throw new Error("oops"); + } catch (exc) { + g.log += exc.message; + } +}; +dbg.onExceptionUnwind = function (frame) { + g.log += 'BAD'; +}; + +g.eval("debugger; log += ' ok';"); +assertEq(g.log, 'oops ok');