blob: bb569aca45d0f8d13b709fd69d23580e82622111 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// When the debugger is triggered twice from the same stack frame, the same
// Debugger.Frame object is passed to the hook both times.
var g = newGlobal();
var hits, frame;
var dbg = Debugger(g);
dbg.onDebuggerStatement = function (f) {
if (hits++ == 0)
frame = f;
else
assertEq(f, frame);
};
hits = 0;
g.evaluate("debugger; debugger;");
assertEq(hits, 2);
hits = 0;
g.evaluate("function f() { debugger; debugger; } f();");
assertEq(hits, 2);
hits = 0;
g.evaluate("eval('debugger; debugger;');");
assertEq(hits, 2);
|