diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/parallel/gc-timeout.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/parallel/gc-timeout.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,27 @@ +// |jit-test| exitstatus: 6; + +// One sneaky way to run GC during a parallel section is to invoke the +// gc() function during the parallel timeout! + +load(libdir + "parallelarray-helpers.js"); + +function iterate(x) { + while (x == 2046) { + // for exactly one index, this infinitely loops! + // this ensures that the warmup doesn't loop. + } + return 22; +} + +function timeoutfunc() { + print("Timed out, invoking the GC"); + gc(); + return false; +} + +timeout(1, timeoutfunc); + +if (getBuildConfiguration().parallelJS) + Array.buildPar(2048, iterate); +else + while(true);