Bug 1305592 - Make the WellKnownChecker to use correct originAttributes. r?mcmanus draft
authorTim Huang <tihuang@mozilla.com>
Thu, 27 Oct 2016 11:22:40 +0800
changeset 430751 a00babaac57c0da1334c9530b83208ed74dc3c8c
parent 429594 f9f3cc95d7282f1fd83f66dd74acbcdbfe821915
child 535252 5a253a034a610c02afc867dc328f6527e740ff1e
push id33877
push userbmo:tihuang@mozilla.com
push dateFri, 28 Oct 2016 03:32:11 +0000
reviewersmcmanus
bugs1305592
milestone52.0a1
Bug 1305592 - Make the WellKnownChecker to use correct originAttributes. r?mcmanus
netwerk/protocol/http/AlternateServices.cpp
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -537,16 +537,17 @@ public:
 
   nsresult Start()
   {
     LOG(("WellKnownChecker::Start %p\n", this));
     nsCOMPtr<nsILoadInfo> loadInfo = new LoadInfo(nsContentUtils::GetSystemPrincipal(),
                                                   nullptr, nullptr,
                                                   nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
                                                   nsIContentPolicy::TYPE_OTHER);
+    loadInfo->SetOriginAttributes(mCI->GetOriginAttributes());
 
     RefPtr<nsHttpChannel> chan = new nsHttpChannel();
     nsresult rv;
 
     mTransactionAlternate = new TransactionObserver(chan, this);
     RefPtr<nsHttpConnectionInfo> newCI = mCI->Clone();
     rv = MakeChannel(chan, mTransactionAlternate, newCI, mURI, mCaps, loadInfo);
     if (NS_FAILED(rv)) {