Backed out changeset 9c18d3b6998c (bug 1268559) for build bustage a=backout FIREFOX_48_0b4_BUILD1 FIREFOX_48_0b4_RELEASE
authorWes Kocher <wkocher@mozilla.com>
Mon, 27 Jun 2016 14:43:57 -0700
changeset 382424 676a32cdd41fd372f4c6df3a4954939f73a6ef02
parent 382423 5fa507fc453c3fbfa704a3769025a96475310ed0
child 382425 2605c36cc36323c20897fb435e0f742e0c3971d7
push id21714
push useraswan@mozilla.com
push dateWed, 29 Jun 2016 16:52:53 +0000
reviewersbackout
bugs1268559
milestone48.0
backs out9c18d3b6998ccb565c52bc5738dedbc28f14a86e
Backed out changeset 9c18d3b6998c (bug 1268559) for build bustage a=backout
dom/ipc/ContentChild.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -3038,34 +3038,16 @@ ContentChild::StartForceKillTimer()
 ContentChild::ForceKillTimerCallback(nsITimer* aTimer, void* aClosure)
 {
   ProcessChild::QuickExit();
 }
 
 bool
 ContentChild::RecvShutdown()
 {
-  // If we receive the shutdown message from within a nested event loop, we want
-  // to wait for that event loop to finish. Otherwise we could prematurely
-  // terminate an "unload" or "pagehide" event handler (which might be doing a
-  // sync XHR, for example).
-  nsCOMPtr<nsIThread> thread;
-  nsresult rv = NS_GetMainThread(getter_AddRefs(thread));
-  if (NS_SUCCEEDED(rv) && thread) {
-    RefPtr<nsThread> mainThread(thread.forget().downcast<nsThread>());
-    if (mainThread->RecursionDepth() > 1) {
-      // We're in a nested event loop. Let's delay for an arbitrary period of
-      // time (100ms) in the hopes that the event loop will have finished by
-      // then.
-      MessageLoop::current()->PostDelayedTask(
-        NewRunnableMethod(this, &ContentChild::RecvShutdown), 100);
-      return true;
-    }
-  }
-
   if (mPolicy) {
     mPolicy->Deactivate();
     mPolicy = nullptr;
   }
 
   nsCOMPtr<nsIObserverService> os = services::GetObserverService();
   if (os) {
     os->NotifyObservers(static_cast<nsIContentChild*>(this),