Bug 1064890 - Initialize the date cache cleaner for content processes forked from b2g. r=khuey, a=bajaj
authorCervantes Yu <cyu@mozilla.com>
Mon, 15 Sep 2014 19:10:21 +0800
changeset 204007 b5b0d9414471991c60e62c76a683fbb737cda40c
parent 204006 c68e3451930015d6a242b010dd4bf278d06f5af6
child 204008 40a73e349ab5423034dae166d7cd6c29db9fbec6
push id366
push userryanvm@gmail.com
push dateTue, 30 Sep 2014 13:33:20 +0000
treeherdermozilla-b2g32_v2_0@a179806720e4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, bajaj
bugs1064890
milestone32.0
Bug 1064890 - Initialize the date cache cleaner for content processes forked from b2g. r=khuey, a=bajaj
dom/ipc/ContentChild.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -472,16 +472,23 @@ NS_IMPL_ISUPPORTS(BackgroundChildPrimer,
 
 ContentChild* ContentChild::sSingleton;
 
 // Performs initialization that is not fork-safe, i.e. that must be done after
 // forking from the Nuwa process.
 static void
 InitOnContentProcessCreated()
 {
+#ifdef MOZ_NUWA_PROCESS
+    // Wait until we are forked from Nuwa
+    if (IsNuwaProcess()) {
+        return;
+    }
+#endif
+
     // This will register cross-process observer.
     mozilla::dom::time::InitializeDateCacheCleaner();
 }
 
 ContentChild::ContentChild()
  : mID(uint64_t(-1))
 #ifdef ANDROID
    ,mScreenSize(0, 0)