Dan Ballard pushed to branch tor-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser
Commits: 6b951761 by Dan Ballard at 2025-04-08T10:48:15-07:00 BB 43544: DoH pane undefined error in Privacy and Security From: Sarah Jamie Lewis <[email protected]> Date: Fri, 28 Feb 2025 09:30:45 -0800 Subject: [PATCH 1/1] DoH Settings: Check for nulll gParentalControlsService When the parental controls service is disabled in a build, the DoH settings now display the correct stauts when Increased or Max Protection is enabled. Previously, selecting either of these options would cause DoH to be enabled, but the "Status" and "Provider" fields would not be properly populated, due to a check on the gParentalControlsService causing an error. This check is now identical to the same check in DownloadIntegration.sys.mjs Apply 1 suggestion(s) to 1 file(s) Co-authored-by: ma1 <[email protected]> - - - - - 1 changed file: - browser/components/preferences/privacy.js Changes: ===================================== browser/components/preferences/privacy.js ===================================== @@ -54,11 +54,12 @@ ChromeUtils.defineLazyGetter(lazy, "AboutLoginsL10n", () => { return new Localization(["branding/brand.ftl", "browser/aboutLogins.ftl"]); }); -XPCOMUtils.defineLazyServiceGetter( - lazy, - "gParentalControlsService", - "@mozilla.org/parental-controls-service;1", - "nsIParentalControlsService" +ChromeUtils.defineLazyGetter(lazy, "gParentalControlsService", () => + "@mozilla.org/parental-controls-service;1" in Cc + ? Cc["@mozilla.org/parental-controls-service;1"].createInstance( + Ci.nsIParentalControlsService + ) + : null ); XPCOMUtils.defineLazyScriptGetter( @@ -741,7 +742,7 @@ var gPrivacyPane = { mode == Ci.nsIDNSService.MODE_TRRFIRST || mode == Ci.nsIDNSService.MODE_TRRONLY ) { - if (lazy.gParentalControlsService.parentalControlsEnabled) { + if (lazy.gParentalControlsService?.parentalControlsEnabled) { return "preferences-doh-status-not-active"; } let confirmationState = Services.dns.currentTrrConfirmationState; @@ -764,7 +765,7 @@ var gPrivacyPane = { if ( (mode == Ci.nsIDNSService.MODE_TRRFIRST || mode == Ci.nsIDNSService.MODE_TRRONLY) && - lazy.gParentalControlsService.parentalControlsEnabled + lazy.gParentalControlsService?.parentalControlsEnabled ) { errReason = Services.dns.getTRRSkipReasonName( Ci.nsITRRSkipReason.TRR_PARENTAL_CONTROL View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6b951761c022b514e0fce487772891159eb9581f -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6b951761c022b514e0fce487772891159eb9581f You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________ tbb-commits mailing list -- [email protected] To unsubscribe send an email to [email protected]
