Bug 1305592 - Make the WellKnownChecker to use correct originAttributes. r=mcmanus
authorTim Huang <tihuang@mozilla.com>
Thu, 27 Oct 2016 11:22:40 +0800
changeset 351686 c669673b4192490d93d7a3120301ba93fabbf623
parent 351685 2133a6ec73c4295a49c452c95b66f41826229e64
child 351687 17198099ff27d75333e6b15a1786da06ab3b2bb8
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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)) {