blob: de16e680be5548f273db58c0be72135c362e5640 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Check that {return:} resumption kills the current stack frame.
var g = newGlobal({newCompartment: true});
g.debuggeeGlobal = this;
g.eval("(" + function () {
var dbg = new Debugger(debuggeeGlobal);
var prev = null;
dbg.onDebuggerStatement = function (frame) {
assertEq(frame === prev, false);
if (prev)
assertEq(prev.onStack, false);
prev = frame;
return {return: frame.arguments[0]};
};
} + ")();");
function f(i) { debugger; }
for (var i = 0; i < 10; i++)
assertEq(f(i), i);
|