mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1801582 - Fix fetch and font preloads not getting deduplicated r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D173532
This commit is contained in:
parent
fefd92b8e9
commit
5807a30612
@ -1,6 +0,0 @@
|
||||
[link-header-preload.html]
|
||||
expected:
|
||||
if not debug: OK
|
||||
CRASH
|
||||
[Makes sure that Link headers preload resources]
|
||||
expected: FAIL
|
@ -219,8 +219,9 @@ void PreloadService::PreloadFont(nsIURI* aURI, const nsAString& aCrossOrigin,
|
||||
CORSMode cors = dom::Element::StringToCORSMode(aCrossOrigin);
|
||||
auto key = PreloadHashKey::CreateAsFont(aURI, cors);
|
||||
|
||||
// * Bug 1618549: Depending on where we decide to do the deduplication, we may
|
||||
// want to check if the font is already being preloaded here.
|
||||
if (PreloadExists(key)) {
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<FontPreloader> preloader = new FontPreloader();
|
||||
dom::ReferrerPolicy referrerPolicy = PreloadReferrerPolicy(aReferrerPolicy);
|
||||
@ -234,8 +235,9 @@ void PreloadService::PreloadFetch(nsIURI* aURI, const nsAString& aCrossOrigin,
|
||||
CORSMode cors = dom::Element::StringToCORSMode(aCrossOrigin);
|
||||
auto key = PreloadHashKey::CreateAsFetch(aURI, cors);
|
||||
|
||||
// * Bug 1618549: Depending on where we decide to do the deduplication, we may
|
||||
// want to check if a fetch is already being preloaded here.
|
||||
if (PreloadExists(key)) {
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<FetchPreloader> preloader = new FetchPreloader();
|
||||
dom::ReferrerPolicy referrerPolicy = PreloadReferrerPolicy(aReferrerPolicy);
|
||||
|
Loading…
Reference in New Issue
Block a user