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

Commits:

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