Backed out changeset 20fdef1f0706 (bug 1120487) for landing with the wrong bug number a=backout
authorWes Kocher <wkocher@mozilla.com>
Thu, 17 Sep 2015 11:19:46 -0700
changeset 283829 77d4b385b761d0c3a9698552dc56757e1c6ff63c
parent 283828 64f3e14a4f82df15081ce7aa0df3e0a38a47ca3f
child 283830 3d007874b9c29e1ad0479aa201334f4eca6261ff
push id909
push userkwierso@gmail.com
push dateThu, 17 Sep 2015 18:22:11 +0000
treeherdermozilla-release@3d007874b9c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1120487
milestone41.0
backs out20fdef1f070675a5daa756c41c1975f280e2d660
Backed out changeset 20fdef1f0706 (bug 1120487) for landing with the wrong bug number a=backout
netwerk/base/nsIOService.cpp
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -663,52 +663,43 @@ nsIOService::NewChannelFromURIWithProxyF
     // NewChannel2() might *not* be implemented.
     // We do not want to break those addons, therefore we first try to create a channel
     // calling NewChannel2(); if that fails:
     // * we fall back to creating a channel by calling NewChannel()
     // * wrap the addon channel
     // * and attach the loadInfo to the channel wrapper
     nsCOMPtr<nsIChannel> channel;
     nsCOMPtr<nsIProxiedProtocolHandler> pph = do_QueryInterface(handler);
-
-    // temporary fix for 41 to not break any addons that do not implement newChannel2.
-    bool newChannel2Succeeded = true;
-
     if (pph) {
         rv = pph->NewProxiedChannel2(aURI, nullptr, aProxyFlags, aProxyURI,
                                      aLoadInfo, getter_AddRefs(channel));
         // if calling NewProxiedChannel2() fails we try to fall back to
         // creating a new proxied channel by calling NewProxiedChannel().
         if (NS_FAILED(rv)) {
-            newChannel2Succeeded = false;
             rv = pph->NewProxiedChannel(aURI, nullptr, aProxyFlags, aProxyURI,
                                         getter_AddRefs(channel));
             NS_ENSURE_SUCCESS(rv, rv);
-            // temporary fix for 41: do not wrap any channels
-            // channel = new nsSecCheckWrapChannel(channel, aLoadInfo);
+            // we have to wrap that channel
+            channel = new nsSecCheckWrapChannel(channel, aLoadInfo);
         }
     }
     else {
         rv = handler->NewChannel2(aURI, aLoadInfo, getter_AddRefs(channel));
         // if calling newChannel2() fails we try to fall back to
         // creating a new channel by calling NewChannel().
         if (NS_FAILED(rv)) {
-            newChannel2Succeeded = false;
             rv = handler->NewChannel(aURI, getter_AddRefs(channel));
             NS_ENSURE_SUCCESS(rv, rv);
-            // temporary fix for 41: do not wrap any channels
-            // channel = new nsSecCheckWrapChannel(channel, aLoadInfo);
+            // we have to wrap that channel
+            channel = new nsSecCheckWrapChannel(channel, aLoadInfo);
         }
     }
 
     // Make sure that all the individual protocolhandlers attach a loadInfo.
-
-    // temporary fix for 41: only check the loadInfo if the call to
-    // newChannel2 succeeded.
-    if (aLoadInfo && newChannel2Succeeded) {
+    if (aLoadInfo) {
       // make sure we have the same instance of loadInfo on the newly created channel
       nsCOMPtr<nsILoadInfo> loadInfo;
       channel->GetLoadInfo(getter_AddRefs(loadInfo));
 
       if (aLoadInfo != loadInfo) {
         MOZ_ASSERT(false, "newly created channel must have a loadinfo attached");
         return NS_ERROR_UNEXPECTED;
       }