From 6a49fe450e6a380b049636a10d0b4ddf95e388ff Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 23 May 2024 09:38:52 +0000 Subject: [PATCH] Bug 1895084 - Remove network.trr.fetch_off_main_thread pref r=sunil,necko-reviewers,valentin Differential Revision: https://phabricator.services.mozilla.com/D209587 --- modules/libpref/init/StaticPrefList.yaml | 6 ------ netwerk/dns/TRRService.cpp | 3 +-- netwerk/test/unit/head_trr.js | 1 - netwerk/test/unit/test_trr_proxy.js | 12 +++--------- netwerk/test/unit/test_trr_proxy_auth.js | 1 - 5 files changed, 4 insertions(+), 19 deletions(-) diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 5bbd4976e341..fb7f16282145 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -12794,12 +12794,6 @@ value: false mirror: always -# This pref controls whether to use TRRServiceChannel off main thread. -- name: network.trr.fetch_off_main_thread - type: RelaxedAtomicBool - value: true - mirror: always - # If we should wait for captive portal confirmation before enabling TRR - name: network.trr.wait-for-portal type: RelaxedAtomicBool diff --git a/netwerk/dns/TRRService.cpp b/netwerk/dns/TRRService.cpp index 4599e7b5c0e5..749f736d65c2 100644 --- a/netwerk/dns/TRRService.cpp +++ b/netwerk/dns/TRRService.cpp @@ -532,8 +532,7 @@ nsresult TRRService::DispatchTRRRequestInternal(TRR* aTrrRequest, } already_AddRefed TRRService::MainThreadOrTRRThread(bool aWithLock) { - if (!StaticPrefs::network_trr_fetch_off_main_thread() || - XRE_IsSocketProcess() || mDontUseTRRThread) { + if (XRE_IsSocketProcess() || mDontUseTRRThread) { return do_GetMainThread(); } diff --git a/netwerk/test/unit/head_trr.js b/netwerk/test/unit/head_trr.js index 00624e2c96a8..a66cdbc9a015 100644 --- a/netwerk/test/unit/head_trr.js +++ b/netwerk/test/unit/head_trr.js @@ -82,7 +82,6 @@ function trr_clear_prefs() { Services.prefs.clearUserPref("network.trr.excluded-domains"); Services.prefs.clearUserPref("network.trr.builtin-excluded-domains"); Services.prefs.clearUserPref("network.trr.clear-cache-on-pref-change"); - Services.prefs.clearUserPref("network.trr.fetch_off_main_thread"); Services.prefs.clearUserPref("captivedetect.canonicalURL"); Services.prefs.clearUserPref("network.http.http2.enabled"); diff --git a/netwerk/test/unit/test_trr_proxy.js b/netwerk/test/unit/test_trr_proxy.js index 9c1154d7a715..88d80ed40ca9 100644 --- a/netwerk/test/unit/test_trr_proxy.js +++ b/netwerk/test/unit/test_trr_proxy.js @@ -109,12 +109,8 @@ async function do_test_pac_dnsResolve() { trr_test_setup(); - async function test_with(DOMAIN, trrMode, fetchOffMainThread) { + async function test_with(DOMAIN, trrMode) { Services.prefs.setIntPref("network.trr.mode", trrMode); // TRR first - Services.prefs.setBoolPref( - "network.trr.fetch_off_main_thread", - fetchOffMainThread - ); override.addIPOverride(DOMAIN, "127.0.0.1"); chan = NetUtil.newChannel({ @@ -126,10 +122,8 @@ async function do_test_pac_dnsResolve() { await override.clearHostOverride(DOMAIN); } - await test_with("test1.com", 2, true); - await test_with("test2.com", 3, true); - await test_with("test3.com", 2, false); - await test_with("test4.com", 3, false); + await test_with("test1.com", 2); + await test_with("test2.com", 3); await httpserv.stop(); } diff --git a/netwerk/test/unit/test_trr_proxy_auth.js b/netwerk/test/unit/test_trr_proxy_auth.js index afd2043d32eb..4a579b2ac262 100644 --- a/netwerk/test/unit/test_trr_proxy_auth.js +++ b/netwerk/test/unit/test_trr_proxy_auth.js @@ -11,7 +11,6 @@ function setup() { trr_test_setup(); - Services.prefs.setBoolPref("network.trr.fetch_off_main_thread", true); } setup();