From 9706eeb9cce6150877874c101160635e0be7191d Mon Sep 17 00:00:00 2001 From: Manuel Bucher Date: Thu, 13 Jan 2022 08:30:42 +0000 Subject: [PATCH] Bug 1749437 - Fix spelling of priorization r=necko-reviewers,kershaw Change spelling in both network.http.http3.priorization and network.http.http3.send_background_tabs_deprioritization config option Differential Revision: https://phabricator.services.mozilla.com/D135689 --- modules/libpref/init/StaticPrefList.yaml | 6 +++--- netwerk/protocol/http/Http3Stream.cpp | 13 +++++++------ netwerk/test/unit/test_http3_prio.js | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index cb4cc2d46f55..bff8a0cd23bf 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -10363,9 +10363,9 @@ value: 12582912 mirror: always -# Enable http3 network priorization as described in +# Enable http3 network priority as described in # https://httpwg.org/http-extensions/draft-ietf-httpbis-priority.html -- name: network.http.http3.priorization +- name: network.http.http3.priority type: RelaxedAtomicBool value: true mirror: always @@ -10375,7 +10375,7 @@ # improve performance when switching to an tab with a website using the same # QUIC connection. On the other hand it sends more data to the website and # might be a privacy concern. -- name: network.http.http3.send_background_tabs_depriorization +- name: network.http.http3.send_background_tabs_deprioritization type: RelaxedAtomicBool value: false mirror: always diff --git a/netwerk/protocol/http/Http3Stream.cpp b/netwerk/protocol/http/Http3Stream.cpp index 63cf9236648f..be598e0a4cba 100644 --- a/netwerk/protocol/http/Http3Stream.cpp +++ b/netwerk/protocol/http/Http3Stream.cpp @@ -169,7 +169,8 @@ void Http3Stream::TopBrowsingContextIdChanged(uint64_t id) { mCurrentTopBrowsingContextId = id; bool nowFocused = (mCurrentTopBrowsingContextId == mTransactionTabId); - if (!StaticPrefs::network_http_http3_send_background_tabs_depriorization() || + if (!StaticPrefs:: + network_http_http3_send_background_tabs_deprioritization() || previouslyFocused == nowFocused) { return; } @@ -537,12 +538,12 @@ nsresult Http3Stream::Finish0RTT(bool aRestart) { } uint8_t Http3Stream::PriorityUrgency() { - if (!StaticPrefs::network_http_http3_priorization()) { - // send default priorization which is equivalent to sending no priorization + if (!StaticPrefs::network_http_http3_priority()) { + // send default priority which is equivalent to sending no priority return 3; } - if (StaticPrefs::network_http_http3_send_background_tabs_depriorization() && + if (StaticPrefs::network_http_http3_send_background_tabs_deprioritization() && mCurrentTopBrowsingContextId != mTransactionTabId) { // Low priority return 6; @@ -551,8 +552,8 @@ uint8_t Http3Stream::PriorityUrgency() { } bool Http3Stream::PriorityIncremental() { - if (!StaticPrefs::network_http_http3_priorization()) { - // send default priorization which is equivalent to sending no priorization + if (!StaticPrefs::network_http_http3_priority()) { + // send default priority which is equivalent to sending no priority return false; } return mPriorityIncremental; diff --git a/netwerk/test/unit/test_http3_prio.js b/netwerk/test/unit/test_http3_prio.js index 261b3c83ec10..41cae3c30f1b 100644 --- a/netwerk/test/unit/test_http3_prio.js +++ b/netwerk/test/unit/test_http3_prio.js @@ -77,7 +77,7 @@ async function test_flag_priority(context, flag, expected_priority) { } add_task(async function test_http3_prio() { - Services.prefs.setBoolPref("network.http.http3.priorization", false); + Services.prefs.setBoolPref("network.http.http3.priority", false); await test_flag_priority("disabled (none)", null, null); await test_flag_priority( "disabled (urgent_start)", @@ -117,7 +117,7 @@ add_task(async function test_http3_prio() { }); add_task(async function test_http3_prio_enabled() { - Services.prefs.setBoolPref("network.http.http3.priorization", true); + Services.prefs.setBoolPref("network.http.http3.priority", true); await test_flag_priority("enabled (none)", null, "u=4"); await test_flag_priority( "enabled (urgent_start)",