blob: 6fef64d6356a4a83ffa1da56bb26014261c528f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Setting an onPop handler from an onPop handler doesn't throw, but the
// new handler doesn't fire.
var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);
var log;
dbg.onDebuggerStatement = function handleDebugger(frame) {
log += 'd';
assertEq(frame.type, "eval");
frame.onPop = function firstHandlePop(c) {
log +=')';
assertEq(c.return, 'on investment');
this.onPop = function secondHandlePop(c) {
assertEq("secondHandlePop was called", "secondHandlePop should never be called");
};
};
};
log = "";
g.eval("debugger; 'on investment';");
assertEq(log, 'd)');
|