diff --git a/js/src/ion/AsmJS.cpp b/js/src/ion/AsmJS.cpp index e83739d68bef..f24a8cb8348a 100644 --- a/js/src/ion/AsmJS.cpp +++ b/js/src/ion/AsmJS.cpp @@ -5218,8 +5218,10 @@ js::CompileAsmJS(JSContext *cx, TokenStream &ts, ParseNode *fn, const CompileOpt return Warn(cx, JSMSG_USE_ASM_TYPE_FAIL, "Platform missing signal handler support"); # ifdef JS_PARALLEL_COMPILATION - if (!EnsureParallelCompilationInitialized(cx->runtime)) - return Warn(cx, JSMSG_USE_ASM_TYPE_FAIL, "Failed initialization of compilation threads"); + if (OffThreadCompilationEnabled(cx)) { + if (!EnsureParallelCompilationInitialized(cx->runtime)) + return Warn(cx, JSMSG_USE_ASM_TYPE_FAIL, "Failed compilation thread initialization"); + } # endif ScopedJSDeletePtr module;