Bug 1532318 - Part 2 : update changes of nsIHttpChannel in codebase r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D22786
This commit is contained in:
Thomas Nguyen
2019-05-02 12:33:55 +00:00
parent e7e625129f
commit 2b9a6d0f8d
24 changed files with 158 additions and 119 deletions

View File

@@ -122,6 +122,7 @@
#include "nsThreadUtils.h"
#include "nsURIHashKey.h"
#include "nsVideoFrame.h"
#include "ReferrerInfo.h"
#include "xpcpublic.h"
#include <algorithm>
#include <cmath>
@@ -6211,8 +6212,9 @@ void HTMLMediaElement::SetRequestHeaders(nsIHttpChannel* aChannel) {
MOZ_ASSERT(NS_SUCCEEDED(rv));
// Set the Referer header
rv = aChannel->SetReferrerWithPolicy(OwnerDoc()->GetDocumentURI(),
OwnerDoc()->GetReferrerPolicy());
nsCOMPtr<nsIReferrerInfo> referrerInfo = new ReferrerInfo(
OwnerDoc()->GetDocumentURI(), OwnerDoc()->GetReferrerPolicy());
rv = aChannel->SetReferrerInfoWithoutClone(referrerInfo);
MOZ_ASSERT(NS_SUCCEEDED(rv));
}