Bug 1378760 - LoadInfo::CloneForNewRequest must not carry result principal URI, r=bz
authorHonza Bambas <honzab.moz@firemni.cz>
Thu, 06 Jul 2017 11:10:00 +0200
changeset 608366 ff324c369c9cbaf010b7e8bd6b93348e5d378a03
parent 608365 a20b3deaa51dd6bb82842e93341a6c966bab98cf
child 608367 03b7dd48f78c45c085cea9b9e15ed30172873907
push id68249
push userbmo:rail@mozilla.com
push dateThu, 13 Jul 2017 14:21:35 +0000
reviewersbz
bugs1378760
milestone56.0a1
Bug 1378760 - LoadInfo::CloneForNewRequest must not carry result principal URI, r=bz
netwerk/base/LoadInfo.cpp
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
@@ -413,16 +413,17 @@ LoadInfo::CloneWithNewSecFlags(nsSecurit
 already_AddRefed<nsILoadInfo>
 LoadInfo::CloneForNewRequest() const
 {
   RefPtr<LoadInfo> copy(new LoadInfo(*this));
   copy->mEnforceSecurity = false;
   copy->mInitialSecurityCheckDone = false;
   copy->mRedirectChainIncludingInternalRedirects.Clear();
   copy->mRedirectChain.Clear();
+  copy->mResultPrincipalURI = nullptr;
   return copy.forget();
 }
 
 NS_IMETHODIMP
 LoadInfo::GetLoadingPrincipal(nsIPrincipal** aLoadingPrincipal)
 {
   NS_IF_ADDREF(*aLoadingPrincipal = mLoadingPrincipal);
   return NS_OK;