Bug 854197 - Only initialize WorkerThreadState in parallel mode. r=luke
authorSean Stangl <sstangl@mozilla.com>
Sun, 24 Mar 2013 18:45:35 -0700
changeset 126070 3acbf951b3b1be2050d02f293229af77f426e7cd
parent 126069 fadbd3c36f80ebc1c2cc812e6b77ca6cd84e42dd
child 126078 bef19bca23f9aa2ae4c781ff7ad1b315b65938ad
child 126087 f9ab5d2d5c999e05b061d880a05086588924149e
push id24470
push usersean.stangl@gmail.com
push dateMon, 25 Mar 2013 01:46:46 +0000
treeherdermozilla-central@3acbf951b3b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs854197
milestone22.0a1
first release with
nightly linux32
3acbf951b3b1 / 22.0a1 / 20130325031100 / files
nightly linux64
3acbf951b3b1 / 22.0a1 / 20130325031100 / files
nightly mac
3acbf951b3b1 / 22.0a1 / 20130325031100 / files
nightly win32
3acbf951b3b1 / 22.0a1 / 20130325031100 / files
nightly win64
3acbf951b3b1 / 22.0a1 / 20130325031100 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 854197 - Only initialize WorkerThreadState in parallel mode. r=luke
js/src/ion/AsmJS.cpp
--- a/js/src/ion/AsmJS.cpp
+++ b/js/src/ion/AsmJS.cpp
@@ -5213,18 +5213,20 @@ js::CompileAsmJS(JSContext *cx, TokenStr
     if (cx->compartment->debugMode())
         return Warn(cx, JSMSG_USE_ASM_TYPE_FAIL, "Disabled by debugger");
 
 #ifdef JS_ASMJS
     if (!EnsureAsmJSSignalHandlersInstalled(cx->runtime))
         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;
     if (!CheckModule(cx, ts, fn, &module))
         return !cx->isExceptionPending();
 
     module->initPostLinkFailureInfo(options, scriptSource, bufStart, bufEnd);