Bug 1300464 - Avoid overriding security info with null. r=orange
authorJosh Matthews <josh@joshmatthews.net>
Fri, 23 Sep 2016 13:04:33 -0400
changeset 315186 dddb857bd3fd2e12e4c11d1456cb586f68e87aa3
parent 315185 65566510613321ab3153c5e602b6fb7a42cbc5d1
child 315187 958074f3b83071d701065eb02380b7d817b3b961
push id32563
push userihsiao@mozilla.com
push dateMon, 26 Sep 2016 11:18:33 +0000
treeherderautoland@eb840c87b5fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersorange
bugs1300464
milestone52.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 1300464 - Avoid overriding security info with null. r=orange
netwerk/protocol/http/HttpChannelChild.cpp
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -1317,17 +1317,17 @@ HttpChannelChild::BeginNonIPCRedirect(ns
                               getter_AddRefs(newChannel));
 
   if (NS_SUCCEEDED(rv)) {
     // Ensure that the new channel shares the original channel's security information,
     // since it won't be provided via IPC. In particular, if the target of this redirect
     // is a synthesized response that has its own security info, the pre-redirect channel
     // has already received it and it must be propagated to the post-redirect channel.
     nsCOMPtr<nsIHttpChannelChild> channelChild = do_QueryInterface(newChannel);
-    if (channelChild) {
+    if (mSecurityInfo && channelChild) {
       HttpChannelChild* httpChannelChild = static_cast<HttpChannelChild*>(channelChild.get());
       httpChannelChild->OverrideSecurityInfoForNonIPCRedirect(mSecurityInfo);
     }
 
     rv = gHttpHandler->AsyncOnChannelRedirect(this,
                                               newChannel,
                                               nsIChannelEventSink::REDIRECT_INTERNAL);
   }