Backed out 3 changesets (bug 1503393) for failing xpcshell's test_proxy-failover_canceled.js and mochitest browser-chrome's browser_firstPartyIsolation.js
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 19 Nov 2018 23:14:13 +0200
changeset 503488 d277cd7dcbb4c4c5e2741723fd6974bb79367055
parent 503487 aa84fe3c5853a519f1d3de60cdbb195d9d88f5c4
child 503489 8ada4020596a3a39fb9b08b316cfe849efc394eb
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1503393
milestone65.0a1
backs out02892fb6feaba4654eb127812b8a43147cc6690b
7b1514667292828ecbabc998ad42947da468c0e9
606cfe2ddd368dc617f52795ddb2f5016d3ef1a8
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 3 changesets (bug 1503393) for failing xpcshell's test_proxy-failover_canceled.js and mochitest browser-chrome's browser_firstPartyIsolation.js Backed out changeset 02892fb6feab (bug 1503393) Backed out changeset 7b1514667292 (bug 1503393) Backed out changeset 606cfe2ddd36 (bug 1503393)
browser/components/preferences/connection.js
netwerk/base/nsProtocolProxyService.cpp
netwerk/test/unit/test_protocolproxyservice.js
--- a/browser/components/preferences/connection.js
+++ b/browser/components/preferences/connection.js
@@ -123,17 +123,17 @@ var gConnectionsDialog = {
     // Now update the other protocols
     this.updateProtocolPrefs();
 
     var shareProxiesPref = Preferences.get("network.proxy.share_proxy_settings");
     shareProxiesPref.disabled = proxyTypePref.value != 1;
     var autologinProxyPref = Preferences.get("signon.autologin.proxy");
     autologinProxyPref.disabled = proxyTypePref.value == 0;
     var noProxiesPref = Preferences.get("network.proxy.no_proxies_on");
-    noProxiesPref.disabled = proxyTypePref.value == 0;
+    noProxiesPref.disabled = proxyTypePref.value != 1;
 
     var autoconfigURLPref = Preferences.get("network.proxy.autoconfig_url");
     autoconfigURLPref.disabled = proxyTypePref.value != 2;
 
     this.updateReloadButton();
   },
 
   updateDNSPref() {
--- a/netwerk/base/nsProtocolProxyService.cpp
+++ b/netwerk/base/nsProtocolProxyService.cpp
@@ -2220,22 +2220,16 @@ nsProtocolProxyService::Resolve_Internal
     if (NS_FAILED(rv)) return rv;
 
     // See bug #586908.
     // Avoid endless loop if |uri| is the current PAC-URI. Returning OK
     // here means that we will not use a proxy for this connection.
     if (mPACMan && mPACMan->IsPACURI(uri))
         return NS_OK;
 
-    // if proxies are enabled and this host:port combo is supposed to use a
-    // proxy, check for a proxy.
-    if ((mProxyConfig == PROXYCONFIG_DIRECT) ||
-        !CanUseProxy(uri, info.defaultPort))
-        return NS_OK;
-
     bool mainThreadOnly;
     if (mSystemProxySettings &&
         mProxyConfig == PROXYCONFIG_SYSTEM &&
         NS_SUCCEEDED(mSystemProxySettings->GetMainThreadOnly(&mainThreadOnly)) &&
         !mainThreadOnly) {
         *usePACThread = true;
         return NS_OK;
     }
@@ -2289,16 +2283,23 @@ nsProtocolProxyService::Resolve_Internal
         if (NS_SUCCEEDED(mSystemProxySettings->
                          GetProxyForURI(spec, scheme, host, port,
                                         pacString))) {
             ProcessPACString(pacString, 0, result);
             return NS_OK;
         }
     }
 
+    // if proxies are enabled and this host:port combo is supposed to use a
+    // proxy, check for a proxy.
+    if (mProxyConfig == PROXYCONFIG_DIRECT ||
+        (mProxyConfig == PROXYCONFIG_MANUAL &&
+         !CanUseProxy(uri, info.defaultPort)))
+        return NS_OK;
+
     // Proxy auto config magic...
     if (mProxyConfig == PROXYCONFIG_PAC || mProxyConfig == PROXYCONFIG_WPAD) {
         // Do not query PAC now.
         *usePACThread = true;
         return NS_OK;
     }
 
     // If we aren't in manual proxy configuration mode then we don't
@@ -2554,9 +2555,9 @@ nsProtocolProxyService::GetIsPACLoading(
     *aResult = false;
     if (mPACMan && mPACMan->IsLoading()) {
         *aResult = true;
     }
     return NS_OK;
 }
 
 } // namespace net
-} // namespace mozilla
+} // namespace mozilla
\ No newline at end of file
--- a/netwerk/test/unit/test_protocolproxyservice.js
+++ b/netwerk/test/unit/test_protocolproxyservice.js
@@ -948,50 +948,19 @@ function run_isresolvable_test()
 
 function isresolvable_callback(pi)
 {
   Assert.notEqual(pi, null);
   Assert.equal(pi.type, "http");
   Assert.equal(pi.port, 1234);
   Assert.equal(pi.host, "127.0.0.1");
 
-  run_localhost_pac();
-}
-
-function run_localhost_pac()
-{
-  // test localhost in the pac file
-
-  var pac = 'data:text/plain,' +
-            'function FindProxyForURL(url, host) {' +
-            ' return "PROXY totallycrazy:1234";' +
-            '}';
-
-  // Use default filter list string for "no_proxies_on" ("localhost, 127.0.0.1")
-  prefs.clearUserPref("network.proxy.no_proxies_on");
-  var channel = NetUtil.newChannel({
-    uri: "http://localhost/",
-    loadUsingSystemPrincipal: true
-  });
-  prefs.setIntPref("network.proxy.type", 2);
-  prefs.setCharPref("network.proxy.autoconfig_url", pac);
-
-  var cb = new resolveCallback();
-  cb.nextFunction = localhost_callback;
-  var req = pps.asyncResolve(channel, 0, cb);
-}
-
-function localhost_callback(pi)
-{
-  Assert.equal(pi, null); // no proxy!
-
   prefs.setIntPref("network.proxy.type", 0);
   do_test_finished();
 }
 
-
 function run_test() {
   register_test_protocol_handler();
 
   // start of asynchronous test chain
   run_filter_test();
   do_test_pending();
 }