js/src/jit-test/tests/debug/Script-gc-03.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 // Referents of Debugger.Scripts in other compartments always survive per-compartment GC.
     3 var g = newGlobal();
     4 var dbg = Debugger(g);
     5 var arr = [];
     6 dbg.onDebuggerStatement = function (frame) { arr.push(frame.script); };
     7 g.eval("for (var i = 0; i < 100; i++) Function('debugger;')();");
     8 assertEq(arr.length, 100);
    10 gc(g);
    12 for (var i = 0; i < arr.length; i++)
    13     assertEq(arr[i].lineCount, 1);
    15 gc();

mercurial