[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][base-browser-128.9.0esr-14.5-1] BB 43544: DoH pane undefined error in Privacy and Security



Title: GitLab

ma1 pushed to branch base-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 770f769b
    by Dan Ballard at 2025-04-03T10:48:25-07:00
    BB 43544: DoH pane undefined error in Privacy and Security
    
    From: Sarah Jamie Lewis <sarah@xxxxxxxxxxxxxx>
    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 <giorgio@xxxxxxxxx>
    

1 changed file:

Changes:

  • browser/components/preferences/privacy.js
    ... ... @@ -54,11 +54,12 @@ ChromeUtils.defineLazyGetter(lazy, "AboutLoginsL10n", () => {
    54 54
       return new Localization(["branding/brand.ftl", "browser/aboutLogins.ftl"]);
    
    55 55
     });
    
    56 56
     
    
    57
    -XPCOMUtils.defineLazyServiceGetter(
    
    58
    -  lazy,
    
    59
    -  "gParentalControlsService",
    
    60
    -  "@mozilla.org/parental-controls-service;1",
    
    61
    -  "nsIParentalControlsService"
    
    57
    +ChromeUtils.defineLazyGetter(lazy, "gParentalControlsService", () =>
    
    58
    +  "@mozilla.org/parental-controls-service;1" in Cc
    
    59
    +    ? Cc["@mozilla.org/parental-controls-service;1"].createInstance(
    
    60
    +        Ci.nsIParentalControlsService
    
    61
    +      )
    
    62
    +    : null
    
    62 63
     );
    
    63 64
     
    
    64 65
     // TODO: module import via ChromeUtils.defineModuleGetter
    
    ... ... @@ -735,7 +736,7 @@ var gPrivacyPane = {
    735 736
             mode == Ci.nsIDNSService.MODE_TRRFIRST ||
    
    736 737
             mode == Ci.nsIDNSService.MODE_TRRONLY
    
    737 738
           ) {
    
    738
    -        if (lazy.gParentalControlsService.parentalControlsEnabled) {
    
    739
    +        if (lazy.gParentalControlsService?.parentalControlsEnabled) {
    
    739 740
               return "preferences-doh-status-not-active";
    
    740 741
             }
    
    741 742
             let confirmationState = Services.dns.currentTrrConfirmationState;
    
    ... ... @@ -758,7 +759,7 @@ var gPrivacyPane = {
    758 759
         if (
    
    759 760
           (mode == Ci.nsIDNSService.MODE_TRRFIRST ||
    
    760 761
             mode == Ci.nsIDNSService.MODE_TRRONLY) &&
    
    761
    -      lazy.gParentalControlsService.parentalControlsEnabled
    
    762
    +      lazy.gParentalControlsService?.parentalControlsEnabled
    
    762 763
         ) {
    
    763 764
           errReason = Services.dns.getTRRSkipReasonName(
    
    764 765
             Ci.nsITRRSkipReason.TRR_PARENTAL_CONTROL
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx