1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/gc-09.2.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,16 @@ 1.4 +// Bug 717104 - Unreachable debuggee globals should not keep their debuggers 1.5 +// alive. The loop is to defeat conservative stack scanning; if the same stack 1.6 +// locations are used each time through the loop, at least three of the 1.7 +// debuggers should be collected. 1.8 +// 1.9 +// This is a slight modification of gc-09.js, which contains a cycle. 1.10 + 1.11 +for (var i = 0; i < 4; i++) { 1.12 + var g = newGlobal(); 1.13 + var dbg = new Debugger(g); 1.14 + dbg.onDebuggerStatement = function () { throw "FAIL"; }; 1.15 + dbg.o = makeFinalizeObserver(); 1.16 +} 1.17 + 1.18 +gc(); 1.19 +assertEq(finalizeCount() > 0, true);