michael@0: // |jit-test| exitstatus: 6; michael@0: michael@0: setJitCompilerOption("baseline.usecount.trigger", 1); michael@0: setJitCompilerOption("ion.usecount.trigger", 2); michael@0: michael@0: // The timepout function is made to trigger the interruption callback. The michael@0: // interruption callback will protect the code while a GC might be michael@0: // marking/updating pointers in it. michael@0: var x = 0; michael@0: function interrupt_gc() { michael@0: if (x++ >= 20) michael@0: return; michael@0: timeout(0.1, interrupt_gc); michael@0: while(x < 20) michael@0: gc(); michael@0: } michael@0: michael@0: interrupt_gc();