Backed out changeset ece3f69eb1b1 (bug 1035075) for various gc crashes
authorWes Kocher <wkocher@mozilla.com>
Fri, 18 Jul 2014 15:32:00 -0700
changeset 217022 e2650b0b07d62b96926cb2ee33eeada448dd2160
parent 217021 4c25019b1a1e227d14bd25152e5f4478577f1a85
child 217023 db93dd7269d2f490fc74fef3b4e5845aacf5675c
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1035075
milestone33.0a1
backs outece3f69eb1b1b865347bfc115ee93e969192d64c
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 ece3f69eb1b1 (bug 1035075) for various gc crashes
netwerk/base/src/nsPACMan.cpp
--- a/netwerk/base/src/nsPACMan.cpp
+++ b/netwerk/base/src/nsPACMan.cpp
@@ -282,24 +282,16 @@ nsPACMan::~nsPACMan()
 
 void
 nsPACMan::Shutdown()
 {
   NS_ABORT_IF_FALSE(NS_IsMainThread(), "pacman must be shutdown on main thread");
   CancelExistingLoad();
   mShutdown = true;
   PostCancelPendingQ(NS_ERROR_ABORT);
-
-  // this can't return until pac thread is joined
-  LOG(("nsPACMan::Shutdown Thread shutdown start %p", mPACThread.get()));
-  if (mPACThread) {
-    mPACThread->Shutdown();
-    mPACThread = nullptr;
-  }
-  LOG(("nsPACMan::Shutdown Thread shutdown finish"));
 }
 
 nsresult
 nsPACMan::AsyncGetProxyForURI(nsIURI *uri, nsPACManCallback *callback,
                               bool mainThreadResponse)
 {
   NS_ABORT_IF_FALSE(NS_IsMainThread(), "wrong thread");
   if (mShutdown)
@@ -497,22 +489,21 @@ nsPACMan::CancelPendingQ(nsresult status
 }
 
 void
 nsPACMan::ProcessPendingQ()
 {
   NS_ABORT_IF_FALSE(!NS_IsMainThread(), "wrong thread");
   while (ProcessPending());
 
-  if (mShutdown) {
+  // do GC while the thread has nothing pending
+  mPAC.GC();
+
+  if (mShutdown)
     mPAC.Shutdown();
-  } else {
-    // do GC while the thread has nothing pending
-    mPAC.GC();
-  }
 }
 
 // returns true if progress was made by shortening the queue
 bool
 nsPACMan::ProcessPending()
 {
   if (mPendingQ.isEmpty())
     return false;