Bug 1895084 - Remove network.trr.fetch_off_main_thread pref r=sunil,necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D209587
This commit is contained in:
Sean 2024-05-23 09:38:52 +00:00
parent ffe0356dc3
commit 6a49fe450e
5 changed files with 4 additions and 19 deletions

View File

@ -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

View File

@ -532,8 +532,7 @@ nsresult TRRService::DispatchTRRRequestInternal(TRR* aTrrRequest,
}
already_AddRefed<nsIThread> TRRService::MainThreadOrTRRThread(bool aWithLock) {
if (!StaticPrefs::network_trr_fetch_off_main_thread() ||
XRE_IsSocketProcess() || mDontUseTRRThread) {
if (XRE_IsSocketProcess() || mDontUseTRRThread) {
return do_GetMainThread();
}

View File

@ -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");

View File

@ -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();
}

View File

@ -11,7 +11,6 @@
function setup() {
trr_test_setup();
Services.prefs.setBoolPref("network.trr.fetch_off_main_thread", true);
}
setup();