blob: 3fd9001f844fbf200a4854294c1e42cda1102be8 (
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
25
26
27
28
|
var g = newGlobal();
g.eval("function f() {\n" +
" debugger;\n" +
"}\n")
var dbg = new Debugger(g);
var handler = {};
dbg.onDebuggerStatement = function (frame) {
frame.script.setBreakpoint(0, {});
};
// create breakpoint
g.f()
// drop our references to things
handler = undefined;
dbg.onDebuggerStatement = undefined;
dbg.removeAllDebuggees();
gc();
//create garbage to trigger a minor GC
var x;
for (var i = 0; i < 100; ++i)
x = {};
gc();
|