Remove implicit cycle-collector dependency on XPConnect lazy initialization broken by 59705c13d959 (rs=peterv)
authorLuke Wagner <lw@mozilla.com>
Thu, 07 Apr 2011 16:53:33 -0700
changeset 67929 1a6fd2901325072a720e5ff84366a406a7be91ab
parent 67928 19dfe9780bbd6f9227a3fef1ec1dbc4c8cdb79cf
child 67930 67596937aa398b3fee032ef90e63eb6541f18749
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
milestone2.2a1pre
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
Remove implicit cycle-collector dependency on XPConnect lazy initialization broken by 59705c13d959 (rs=peterv)
xpcom/base/nsCycleCollector.cpp
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -2558,17 +2558,17 @@ nsCycleCollector::BeginCollection(PRBool
     // cycles. If this is the first cycle collection after startup force
     // a garbage collection, otherwise the GC might not have run yet and
     // the bitmap is invalid.
     if (mFirstCollection && mRuntimes[nsIProgrammingLanguage::JAVASCRIPT]) {
         aForceGC = PR_TRUE;
         mFirstCollection = PR_FALSE;
     }
 
-    if (aForceGC) {
+    if (aForceGC && mRuntimes[nsIProgrammingLanguage::JAVASCRIPT]) {
 #ifdef COLLECT_TIME_DEBUG
         PRTime start = PR_Now();
 #endif
         static_cast<nsCycleCollectionJSRuntime*>
             (mRuntimes[nsIProgrammingLanguage::JAVASCRIPT])->Collect();
 #ifdef COLLECT_TIME_DEBUG
         printf("cc: GC() took %lldms\n", (PR_Now() - start) / PR_USEC_PER_MSEC);
 #endif