blob: abdd3c29dda697a43556a1b15ce633c24daa73bc (
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();
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');
|