1
// When an exception is propagated out of multiple frames, their onPop
2
// and onExceptionUnwind handlers are called in the correct order.
3
var g = newGlobal('new-compartment');
4
g.eval("function f() { throw 'mud'; }");
5
g.eval("function g() { f(); }");
6
g.eval("function h() { g(); }");
7
g.eval("function i() { h(); }");
9
var dbg = new Debugger(g);
11
function makePopHandler(label) {
12
return function handlePop(completion) {
14
assertEq(completion.throw, "mud");
17
dbg.onEnterFrame = function handleEnter(f) {
18
log += "(" + f.callee.name;
19
f.onPop = makePopHandler(")" + f.callee.name);
21
dbg.onExceptionUnwind = function handleExceptionUnwind(f, x) {
23
log += "u" + f.callee.name;
32
assertEq(log, "(i(h(g(fuf)fug)guh)hui)ic");