summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-956324.js
blob: 711fff951620272095dfae41ab7a16b77c1c2cf5 (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({newCompartment: true});
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();