michael@0: // Setting onPop handlers from an onExceptionUnwind handler works. michael@0: var g = newGlobal(); michael@0: var dbg = new Debugger(g); michael@0: var log; michael@0: michael@0: dbg.onExceptionUnwind = function handleUnwind(frame) { michael@0: log += 'u'; michael@0: assertEq(frame.type, "eval"); michael@0: frame.onPop = function handleCallPop(c) { michael@0: log += ')'; michael@0: assertEq(c.throw, 'up'); michael@0: }; michael@0: }; michael@0: michael@0: log = ""; michael@0: try { michael@0: g.eval("throw 'up';"); michael@0: log += '-'; michael@0: } catch (x) { michael@0: log += 'c'; michael@0: assertEq(x, 'up'); michael@0: } michael@0: assertEq(log, 'u)c');