diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index 5b5d6790796..fd7fa07972f 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -1716,12 +1716,13 @@ IonCompile(JSContext *cx, JSScript *script, if (recompile) { JS_ASSERT(executionMode == SequentialExecution); builderScript->ionScript()->setRecompiling(); - } else { - SetIonScript(builder->script(), executionMode, ION_COMPILING_SCRIPT); } // If possible, compile the script off thread. if (OffThreadCompilationAvailable(cx)) { + if (!recompile) + SetIonScript(builder->script(), executionMode, ION_COMPILING_SCRIPT); + if (!StartOffThreadIonCompile(cx, builder)) { IonSpew(IonSpew_Abort, "Unable to start off-thread ion compilation."); return AbortReason_Alloc;