Don't call GC or CC unexpectedly during shutdown (bug 635251, r/a=gal).
authorOlli.Pettay@gmail.com
Sun, 20 Feb 2011 00:20:14 -0800
changeset 62956 8ba032375d53eda14e67efd8e86aeef5309ec25d
parent 62955 f2fa1da62fe3ca7613c02a23d19e760abc2e1ac7
child 62957 c307f596458f8f79c148911f9464e92a4b687f69
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
bugs635251
milestone2.0b12pre
Don't call GC or CC unexpectedly during shutdown (bug 635251, r/a=gal).
dom/base/nsJSEnvironment.cpp
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -3360,18 +3360,16 @@ nsJSContext::PokeGC()
     // There's already a timer for GC'ing, just return
     return;
   }
 
   CallCreateInstance("@mozilla.org/timer;1", &sGCTimer);
 
   if (!sGCTimer) {
     NS_WARNING("Failed to create timer");
-
-    GarbageCollectNow();
     return;
   }
 
   static PRBool first = PR_TRUE;
 
   sGCTimer->InitWithFuncCallback(GCTimerFired, nsnull,
                                  first
                                  ? NS_FIRST_GC_DELAY
@@ -3398,18 +3396,16 @@ nsJSContext::PokeCC()
     // There's already a timer for GC'ing, just return
     return;
   }
 
   CallCreateInstance("@mozilla.org/timer;1", &sCCTimer);
 
   if (!sCCTimer) {
     NS_WARNING("Failed to create timer");
-
-    CycleCollectNow();
     return;
   }
 
   sCCTimer->InitWithFuncCallback(CCTimerFired, nsnull,
                                  NS_CC_DELAY,
                                  nsITimer::TYPE_ONE_SHOT);
 }