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

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



Title: GitLab

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 <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
     XPCOMUtils.defineLazyScriptGetter(
    
    ... ... @@ -741,7 +742,7 @@ var gPrivacyPane = {
    741 742
             mode == Ci.nsIDNSService.MODE_TRRFIRST ||
    
    742 743
             mode == Ci.nsIDNSService.MODE_TRRONLY
    
    743 744
           ) {
    
    744
    -        if (lazy.gParentalControlsService.parentalControlsEnabled) {
    
    745
    +        if (lazy.gParentalControlsService?.parentalControlsEnabled) {
    
    745 746
               return "preferences-doh-status-not-active";
    
    746 747
             }
    
    747 748
             let confirmationState = Services.dns.currentTrrConfirmationState;
    
    ... ... @@ -764,7 +765,7 @@ var gPrivacyPane = {
    764 765
         if (
    
    765 766
           (mode == Ci.nsIDNSService.MODE_TRRFIRST ||
    
    766 767
             mode == Ci.nsIDNSService.MODE_TRRONLY) &&
    
    767
    -      lazy.gParentalControlsService.parentalControlsEnabled
    
    768
    +      lazy.gParentalControlsService?.parentalControlsEnabled
    
    768 769
         ) {
    
    769 770
           errReason = Services.dns.getTRRSkipReasonName(
    
    770 771
             Ci.nsITRRSkipReason.TRR_PARENTAL_CONTROL
    

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