зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1866277 - Fix <link rel=preload as=fetch> priority when fetchpriority disabled. r=emilio
This commit aligns the internal priority of <link rel=preload as=fetch> when fetchpriority support is disabled with the fetchpriority=auto case when the support is enabled. Also aligns unreachable code in LinkRelPreloadFetch with that value. Differential Revision: https://phabricator.services.mozilla.com/D199877
This commit is contained in:
Родитель
a8beb5525e
Коммит
dfe20823f5
|
@ -1,11 +1,3 @@
|
||||||
[fetchpriority-disabled.h2.html]
|
[fetchpriority-disabled.h2.html]
|
||||||
lsan-allowed: [mozilla::net::AddStaticElement, InitializeStaticHeaders, mozilla::net::nvFIFO::nvFIFO, mozilla::net::Http2BaseCompressor::Http2BaseCompressor] # https://bugzilla.mozilla.org/show_bug.cgi?id=1759310
|
lsan-allowed: [mozilla::net::AddStaticElement, InitializeStaticHeaders, mozilla::net::nvFIFO::nvFIFO, mozilla::net::Http2BaseCompressor::Http2BaseCompressor] # https://bugzilla.mozilla.org/show_bug.cgi?id=1759310
|
||||||
prefs: [network.fetchpriority.enabled:false]
|
prefs: [network.fetchpriority.enabled:false]
|
||||||
[link-initial-preload-fetch.h2.html: test different 'fetchpriority' values]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[link-dynamic-preload-fetch.h2.html: test different 'fetchpriority' values]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[link-header.h2.html?pipe=header(Link,<dummy.txt?1>; rel=preload; as=fetch; fetchpriority=low,True)|header(Link,<dummy.txt?2>; rel=preload; as=fetch; fetchpriority=high,True)|header(Link,<dummy.txt?3>; rel=preload; as=fetch; fetchpriority=auto,True)|header(Link,<dummy.txt?4>; rel=preload; as=fetch,True): test different 'fetchpriority' values]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ class SupportsPriorityValueFor {
|
||||||
|
|
||||||
static int32_t LinkRelPreloadFetch(const FetchPriority aFetchPriority) {
|
static int32_t LinkRelPreloadFetch(const FetchPriority aFetchPriority) {
|
||||||
if (!StaticPrefs::network_fetchpriority_enabled()) {
|
if (!StaticPrefs::network_fetchpriority_enabled()) {
|
||||||
return nsISupportsPriority::PRIORITY_NORMAL;
|
return nsISupportsPriority::PRIORITY_HIGH;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (aFetchPriority) {
|
switch (aFetchPriority) {
|
||||||
|
@ -176,7 +176,7 @@ class SupportsPriorityValueFor {
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ASSERT_UNREACHABLE();
|
MOZ_ASSERT_UNREACHABLE();
|
||||||
return nsISupportsPriority::PRIORITY_NORMAL;
|
return nsISupportsPriority::PRIORITY_HIGH;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче