Dan Ballard pushed to branch tor-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
     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