Bug 833143, Don't GC in nsXREDirProvider::DoShutdown(), r=billm,bsmedberg
☠☠ backed out by d014b12e6afc ☠ ☠
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Mon, 18 Aug 2014 12:03:46 +0300
changeset 200129 006353e45fa746f26f9eb2e9ab078eb8cc741fca
parent 200128 1e3389bb8455196954537282af827e66ce16cdf8
child 200130 f6cdb000f3d8300f4c61c1e0885065372cf23c6c
push id27335
push userryanvm@gmail.com
push dateMon, 18 Aug 2014 20:04:42 +0000
treeherdermozilla-central@cd7cbdacf9d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm, bsmedberg
bugs833143
milestone34.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 833143, Don't GC in nsXREDirProvider::DoShutdown(), r=billm,bsmedberg
toolkit/xre/nsXREDirProvider.cpp
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -877,29 +877,16 @@ nsXREDirProvider::DoShutdown()
       mozilla::services::GetObserverService();
     NS_ASSERTION(obsSvc, "No observer service?");
     if (obsSvc) {
       static const char16_t kShutdownPersist[] =
         {'s','h','u','t','d','o','w','n','-','p','e','r','s','i','s','t','\0'};
       obsSvc->NotifyObservers(nullptr, "profile-change-net-teardown", kShutdownPersist);
       obsSvc->NotifyObservers(nullptr, "profile-change-teardown", kShutdownPersist);
 
-      // Phase 2c: Now that things are torn down, force JS GC so that things which depend on
-      // resources which are about to go away in "profile-before-change" are destroyed first.
-
-      nsCOMPtr<nsIJSRuntimeService> rtsvc
-        (do_GetService("@mozilla.org/js/xpc/RuntimeService;1"));
-      if (rtsvc)
-      {
-        JSRuntime *rt = nullptr;
-        rtsvc->GetRuntime(&rt);
-        if (rt)
-          ::JS_GC(rt);
-      }
-
       // Phase 3: Notify observers of a profile change
       obsSvc->NotifyObservers(nullptr, "profile-before-change", kShutdownPersist);
       obsSvc->NotifyObservers(nullptr, "profile-before-change2", kShutdownPersist);
     }
     mProfileNotified = false;
   }
 }