Back out changeset f698c8166457 (bug 1035075) for B2G ICS Emulator Opt mochitest-7 orange.
authorL. David Baron <dbaron@dbaron.org>
Sat, 19 Jul 2014 09:12:27 -0700
changeset 217098 cabc7efd2c1fdefa9abed927ef3aff42ee46a499
parent 217097 36f891d6eaec3081e3c1f41a18f5ede367a57bc0
child 217099 7e65e2b5bcdd366673d57531f3b12e3d148f7906
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 outf698c8166457b1e52f6cfcc7f62f593294cda262
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
Back out changeset f698c8166457 (bug 1035075) for B2G ICS Emulator Opt mochitest-7 orange.
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;