Bug 1421793 - nsPACMan needs to be shutdown before dtor; r=schien
authorLiang-Heng Chen <xeonchen@gmail.com>
Fri, 01 Dec 2017 15:10:36 +0800
changeset 394788 243f87297824e1120e510f383c57785910cb1119
parent 394787 17cfd08531e319b1f3e9167d176d8bed1b1bba72
child 394789 944ec9b4d0ef2b6ef19e2ae9d82190867027ca46
push id33019
push userbtara@mozilla.com
push dateMon, 04 Dec 2017 20:16:32 +0000
treeherdermozilla-central@4a003542df78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersschien
bugs1421793
milestone59.0a1
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
Bug 1421793 - nsPACMan needs to be shutdown before dtor; r=schien MozReview-Commit-ID: D2aKTC8s9MQ
netwerk/base/nsProtocolProxyService.cpp
--- a/netwerk/base/nsProtocolProxyService.cpp
+++ b/netwerk/base/nsProtocolProxyService.cpp
@@ -1161,18 +1161,20 @@ nsProtocolProxyService::SetupPACThread(n
         NS_SUCCEEDED(mSystemProxySettings->GetMainThreadOnly(&mainThreadOnly)) &&
         !mainThreadOnly) {
         rv = mPACMan->Init(mSystemProxySettings);
     }
     else {
         rv = mPACMan->Init(nullptr);
     }
 
-    if (NS_FAILED(rv))
+    if (NS_FAILED(rv)) {
+        mPACMan->Shutdown();
         mPACMan = nullptr;
+    }
     return rv;
 }
 
 nsresult
 nsProtocolProxyService::ResetPACThread()
 {
     if (!mPACMan)
         return NS_OK;