Bug 714050 - Make JS source compression thread optional (r=luke)
authorBill McCloskey <wmccloskey@mozilla.com>
Tue, 16 Oct 2012 11:57:11 -0700
changeset 110600 35b7bc10cc4289773f3add34907863861c9ef9b5
parent 110599 15791e9e6e5de027033d41af4013493adb9a8660
child 110601 cced04530e2f56dff6b4955756090340c9d5c335
push id23700
push userryanvm@gmail.com
push dateThu, 18 Oct 2012 02:10:26 +0000
treeherdermozilla-central@5142bbd4da12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs714050
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 714050 - Make JS source compression thread optional (r=luke)
js/src/jsscript.cpp
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -1147,17 +1147,17 @@ ScriptSource::setSourceCopy(JSContext *c
     const size_t nbytes = length * sizeof(jschar);
     data.compressed = static_cast<unsigned char *>(cx->malloc_(nbytes));
     if (!data.compressed)
         return false;
     length_ = length;
     argumentsNotIncluded_ = argumentsNotIncluded;
 
 #ifdef JS_THREADSAFE
-    if (tok) {
+    if (tok && cx->runtime->useHelperThreads()) {
 #ifdef DEBUG
         ready_ = false;
 #endif
         tok->ss = this;
         tok->chars = src.get();
         cx->runtime->sourceCompressorThread.compress(tok);
     } else
 #endif