blob: 799159af327c22c52dc573c4674f8a6cfe527e17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Hooks and Debugger.prototype.getNewestFrame produce the same Frame object.
var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
var hits = 0;
var savedFrame, savedCallee;
dbg.onDebuggerStatement = function (frame) {
assertEq(frame, savedFrame);
assertEq(frame.onStack, true);
assertEq(frame.callee, savedCallee);
hits++;
};
g.h = function () {
savedFrame = dbg.getNewestFrame();
savedCallee = savedFrame.callee;
assertEq(savedCallee.name, "f");
};
g.eval("function f() { h(); debugger; }");
g.f();
assertEq(hits, 1);
|