Bug 1040441 - Fix ForkJoinGetSlice stub when JS_THREADPOOL_STEAL=0. (r=nmatsakis)

This commit is contained in:
Shu-yu Guo 2014-08-01 11:35:54 -07:00
parent 916e4f08fb
commit 9307487176

View File

@ -2129,6 +2129,8 @@ JitRuntime::generateForkJoinGetSliceStub(JSContext *cx)
// It's not technically correct to test whether work-stealing is turned on
// only during stub-generation time, but it's a DEBUG only thing.
//
// If stealing is off, stealWork falls through to noMoreWork.
if (cx->runtime()->threadPool.workStealing()) {
Label stealWorkLoopHead;
masm.bind(&stealWorkLoopHead);
@ -2196,6 +2198,8 @@ JitRuntime::generateForkJoinGetSliceStub(JSContext *cx)
#endif
// Copies lower 16 bits only.
masm.movzwl(output, output);
} else {
masm.jump(&noMoreWork);
}
// If we successfully got a slice, decrement pool->pendingSlices_ and