blob: 2147a769053c985ca8c289f062ca3ff465dac5a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Setting onPop handlers from an onExceptionUnwind handler works.
var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);
var log;
dbg.onExceptionUnwind = function handleUnwind(frame) {
log += 'u';
assertEq(frame.type, "eval");
frame.onPop = function handleCallPop(c) {
log += ')';
assertEq(c.throw, 'up');
};
};
log = "";
try {
g.eval("throw 'up';");
log += '-';
} catch (x) {
log += 'c';
assertEq(x, 'up');
}
assertEq(log, 'u)c');
|