bug 829006 - apply proxy filters even after failed pac thread r=jduell
authorPatrick McManus <mcmanus@ducksong.com>
Tue, 12 Feb 2013 13:35:04 -0500
changeset 131527 7d39a9c9cb7f79ed1d061b40450ef74a770c0be0
parent 131526 7836f6575a771421eb471a77e8ff3ee99397831a
child 131528 756df77be1937072529d02aa79517f17e9fd5a5c
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjduell
bugs829006
milestone21.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 829006 - apply proxy filters even after failed pac thread r=jduell
netwerk/base/src/nsProtocolProxyService.cpp
--- a/netwerk/base/src/nsProtocolProxyService.cpp
+++ b/netwerk/base/src/nsProtocolProxyService.cpp
@@ -192,16 +192,24 @@ private:
         // In the cancelation case, we may still have another PLEvent in
         // the queue that wants to call DoCallback.  No need to wait for
         // it, just run the callback now.
         DoCallback();
     }
 
     void DoCallback()
     {
+        if (mStatus == NS_ERROR_NOT_AVAILABLE && !mProxyInfo) {
+            // If the PAC service is not avail (e.g. failed pac load
+            // or shutdown) then we will be going direct. Make that
+            // mapping now so that any filters are still applied.
+            mPACString = NS_LITERAL_CSTRING("DIRECT;");
+            mStatus = NS_OK;
+        }
+
         // Generate proxy info from the PAC string if appropriate
         if (NS_SUCCEEDED(mStatus) && !mProxyInfo && !mPACString.IsEmpty()) {
             mPPS->ProcessPACString(mPACString, mResolveFlags,
                                    getter_AddRefs(mProxyInfo));
 
             // Now apply proxy filters
             nsProtocolInfo info;
             mStatus = mPPS->GetProtocolInfo(mURI, &info);