Backed out changeset 272d38101267 (bug 1386369)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 11 Aug 2017 09:27:41 +0200
changeset 374255 c621494dc3f5f5cfd6e9a8e62f19396dbc9b8990
parent 374254 43cb8075d066fba493779e35922ce83c77bdd70d
child 374256 5cd587ec53be835443367007eeb79bdac0ef4c54
push id32318
push userkwierso@gmail.com
push dateFri, 11 Aug 2017 20:16:01 +0000
treeherdermozilla-central@80ff3f300e05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1386369
milestone57.0a1
backs out272d381012677aedc86462ebd8e45b0b30884655
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 272d38101267 (bug 1386369)
toolkit/components/backgroundhangmonitor/HangDetails.cpp
--- a/toolkit/components/backgroundhangmonitor/HangDetails.cpp
+++ b/toolkit/components/backgroundhangmonitor/HangDetails.cpp
@@ -164,43 +164,40 @@ void
 nsHangDetails::Submit()
 {
   if (NS_WARN_IF(!SystemGroup::Initialized())) {
     return;
   }
 
   RefPtr<nsHangDetails> hangDetails = this;
   nsCOMPtr<nsIRunnable> notifyObservers = NS_NewRunnableFunction("NotifyBHRHangObservers", [hangDetails] {
-    // The place we need to report the hang to varies depending on process.
-    //
-    // In child processes, we report the hang to our parent process, while if
-    // we're in the parent process, we report a bhr-thread-hang observer
-    // notification.
+    nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
+    if (os) {
+      os->NotifyObservers(hangDetails, "bhr-thread-hang", nullptr);
+    }
+
+    // If we're not in the parent process, we might need to transmit our hang
+    // details to another process, so that they can be reported there.
     switch (XRE_GetProcessType()) {
     case GeckoProcessType_Content: {
       auto cc = dom::ContentChild::GetSingleton();
       if (cc) {
         Unused << cc->SendBHRThreadHang(hangDetails->mDetails);
       }
       break;
     }
     case GeckoProcessType_GPU: {
       auto gp = gfx::GPUParent::GetSingleton();
       if (gp) {
         Unused << gp->SendBHRThreadHang(hangDetails->mDetails);
       }
       break;
     }
-    case GeckoProcessType_Default: {
-      nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
-      if (os) {
-        os->NotifyObservers(hangDetails, "bhr-thread-hang", nullptr);
-      }
+    case GeckoProcessType_Default:
       break;
-    }
     default:
       // XXX: Consider handling GeckoProcessType_GMPlugin and
       // GeckoProcessType_Plugin?
       NS_WARNING("Unsupported BHR process type - discarding hang.");
       break;
     }
   });