Bug 1685830 - Remove spurious check that prevents preload from working in non-http(s) sites. r=smaug

As it doesn't match other implementations, and it's confusing.

Differential Revision: https://phabricator.services.mozilla.com/D101248
This commit is contained in:
Emilio Cobos Álvarez
2021-01-11 02:37:15 +00:00
parent bca0aed7ba
commit 2b54be07bd
6 changed files with 17 additions and 44 deletions

View File

@@ -736,10 +736,8 @@ void HTMLLinkElement::CancelPrefetchOrPreload() {
void HTMLLinkElement::StartPreload(nsContentPolicyType aPolicyType) {
MOZ_ASSERT(!mPreload, "Forgot to cancel the running preload");
auto referrerInfo = MakeRefPtr<ReferrerInfo>(*this);
RefPtr<PreloaderBase> preload = OwnerDoc()->Preloads().PreloadLinkElement(
this, aPolicyType, referrerInfo);
RefPtr<PreloaderBase> preload =
OwnerDoc()->Preloads().PreloadLinkElement(this, aPolicyType);
mPreload = preload.get();
}