/js/src/jit-test/tests/debug/onExceptionUnwind-04.js
http://github.com/zpao/v8monkey · JavaScript · 17 lines · 15 code · 1 blank · 1 comment · 0 complexity · 8e33e8af1134eb8fd067833001027f11 MD5 · raw file
- // onExceptionUnwind is not called for exceptions thrown and handled in the debugger.
- var g = newGlobal('new-compartment');
- 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');