Bug 833143 - Don't GC in nsXREDirProvider::DoShutdown, r=bsmedberg,billm
☠☠ backed out by ea8af024e14d ☠ ☠
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Thu, 24 Jan 2013 18:39:57 +0200
changeset 119641 689690a17de325806197886e7a0d578aca2c1314
parent 119640 1a3f731ae54ac6673c9bcf292511568904ca32cd
child 119737 fa969919b1bbbb1c9d345419193eb0ae1ec94b51
child 119766 f4e24f6166ff1e9b0bc0b8ce46fe92c5ab7f11aa
push id24218
push useropettay@mozilla.com
push dateThu, 24 Jan 2013 17:19:37 +0000
treeherdermozilla-central@689690a17de3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, billm
bugs833143
milestone21.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=bsmedberg,billm
toolkit/xre/nsXREDirProvider.cpp
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -842,29 +842,16 @@ nsXREDirProvider::DoShutdown()
       mozilla::services::GetObserverService();
     NS_ASSERTION(obsSvc, "No observer service?");
     if (obsSvc) {
       static const PRUnichar 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);
     }
     mProfileNotified = false;
   }
 }
 
 #ifdef XP_WIN