Bug 854197 - Only initialize WorkerThreadState in parallel mode. r=luke

This commit is contained in:
Sean Stangl 2013-03-24 18:45:35 -07:00
parent d80d92f68c
commit 10f9c607ee

View File

@ -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<AsmJSModule> module;