Dan Ballard pushed to branch mullvad-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Mullvad Browser
Commits: 26691804 by Dan Ballard at 2025-04-08T10:40:04-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 ); // TODO: module import via ChromeUtils.defineModuleGetter @@ -735,7 +736,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; @@ -758,7 +759,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/mullvad-browser/-/commit/26691804f4482f1ea5c848f6769bc652816e7547 -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/26691804f4482f1ea5c848f6769bc652816e7547 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]
