blob: dfb765d1e737a9ce7a4b30637258babfbbb3460c (
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({newCompartment: true});
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, "((((((((((()))))))))))");
|