blob: a1bdf71b6c9cfe616afab1d1399ba85bbeb18e6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// onPop handlers fire even on frames that make tail calls.
var g = newGlobal();
var dbg = new Debugger(g);
var log;
g.eval('function f(n) { if (n > 0) f(n-1); else debugger; }');
dbg.onEnterFrame = function handleEnter(frame) {
log += '(';
frame.onPop = function handlePop(c) {
log += ')';
assertEq(typeof c == "object" && 'return' in c, true);
};
};
log = '';
g.f(10);
assertEq(log, "((((((((((()))))))))))");
|