Backed out changeset 6daddfb64d72 (bug 1228437) for timing out in test_NuwaProcessCreation.html on B2G ICS emulator debug. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sun, 27 Dec 2015 23:33:02 +0100
changeset 277687 3505bec8eac57904706ee3ac6f2fbc6b3597d4e4
parent 277686 f26fb489885c01f4e99bfef51c3e3d875f5257cb
child 277688 210aaacaf2b1a5f51b5d78d17c44197af2956614
push id29829
push usercbook@mozilla.com
push dateMon, 28 Dec 2015 09:26:06 +0000
treeherdermozilla-central@7c83da46ea74 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1228437
milestone46.0a1
backs out6daddfb64d72191fbb9e34d1381e259b1730794a
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
Backed out changeset 6daddfb64d72 (bug 1228437) for timing out in test_NuwaProcessCreation.html on B2G ICS emulator debug. r=backout
xpcom/build/XPCOMInit.cpp
xpcom/threads/HangMonitor.cpp
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -527,26 +527,22 @@ NS_InitXPCOM2(nsIServiceManager** aResul
 
   // Set up chromium libs
   NS_ASSERTION(!sExitManager && !sMessageLoop, "Bad logic!");
 
   if (!AtExitManager::AlreadyRegistered()) {
     sExitManager = new AtExitManager();
   }
 
-  MessageLoop* messageLoop = MessageLoop::current();
-  if (!messageLoop) {
+  if (!MessageLoop::current()) {
     sMessageLoop = new MessageLoopForUI(MessageLoop::TYPE_MOZILLA_UI);
     sMessageLoop->set_thread_name("Gecko");
     // Set experimental values for main thread hangs:
     // 128ms for transient hangs and 8192ms for permanent hangs
     sMessageLoop->set_hang_timeouts(128, 8192);
-  } else if (messageLoop->type() == MessageLoop::TYPE_MOZILLA_CHILD) {
-    messageLoop->set_thread_name("Gecko_Child");
-    messageLoop->set_hang_timeouts(128, 8192);
   }
 
   if (XRE_IsParentProcess() &&
       !BrowserProcessSubThread::GetMessageLoop(BrowserProcessSubThread::IO)) {
     UniquePtr<BrowserProcessSubThread> ioThread = MakeUnique<BrowserProcessSubThread>(BrowserProcessSubThread::IO);
 
     base::Thread::Options options;
     options.message_loop_type = MessageLoop::TYPE_IO;
--- a/xpcom/threads/HangMonitor.cpp
+++ b/xpcom/threads/HangMonitor.cpp
@@ -104,22 +104,18 @@ Crash()
 
 #ifdef XP_WIN
   if (::IsDebuggerPresent()) {
     return;
   }
 #endif
 
 #ifdef MOZ_CRASHREPORTER
-  // If you change this, you must also deal with the threadsafety of AnnotateCrashReport in
-  // non-chrome processes!
-  if (GeckoProcessType_Default == XRE_GetProcessType()) {
-    CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("Hang"),
-                                       NS_LITERAL_CSTRING("1"));
-  }
+  CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("Hang"),
+                                     NS_LITERAL_CSTRING("1"));
 #endif
 
   NS_RUNTIMEABORT("HangMonitor triggered");
 }
 
 #ifdef REPORT_CHROME_HANGS
 
 static void
@@ -255,18 +251,20 @@ ThreadMain(void*)
     }
     lock.Wait(timeout);
   }
 }
 
 void
 Startup()
 {
-  if (GeckoProcessType_Default != XRE_GetProcessType() &&
-      GeckoProcessType_Content != XRE_GetProcessType()) {
+  // The hang detector only runs in chrome processes. If you change this,
+  // you must also deal with the threadsafety of AnnotateCrashReport in
+  // non-chrome processes!
+  if (GeckoProcessType_Default != XRE_GetProcessType()) {
     return;
   }
 
   MOZ_ASSERT(!gMonitor, "Hang monitor already initialized");
   gMonitor = new Monitor("HangMonitor");
 
   Preferences::RegisterCallback(PrefChanged, kHangMonitorPrefName, nullptr);
   PrefChanged(nullptr, nullptr);
@@ -290,18 +288,17 @@ Startup()
                             ThreadMain,
                             nullptr, PR_PRIORITY_LOW, PR_GLOBAL_THREAD,
                             PR_JOINABLE_THREAD, 0);
 }
 
 void
 Shutdown()
 {
-  if (GeckoProcessType_Default != XRE_GetProcessType() &&
-      GeckoProcessType_Content != XRE_GetProcessType()) {
+  if (GeckoProcessType_Default != XRE_GetProcessType()) {
     return;
   }
 
   MOZ_ASSERT(gMonitor, "Hang monitor not started");
 
   {
     // Scope the lock we're going to delete later
     MonitorAutoLock lock(*gMonitor);