Pier Angelo Vendrame pushed to branch tor-browser-102.8.0esr-12.5-1 at The Tor Project / Applications / Tor Browser

Commits:

5 changed files:

Changes:

  • browser/base/content/browser-sync.js
    ... ... @@ -5,7 +5,11 @@
    5 5
     // This file is loaded into the browser window scope.
    
    6 6
     /* eslint-env mozilla/browser-window */
    
    7 7
     
    
    8
    -const { UIState } = ChromeUtils.import("resource://services-sync/UIState.jsm");
    
    8
    +ChromeUtils.defineModuleGetter(
    
    9
    +  this,
    
    10
    +  "UIState",
    
    11
    +  "resource://services-sync/UIState.jsm"
    
    12
    +);
    
    9 13
     
    
    10 14
     ChromeUtils.defineModuleGetter(
    
    11 15
       this,
    
    ... ... @@ -342,7 +346,9 @@ var gSync = {
    342 346
       // once syncing completes (bug 1239042).
    
    343 347
       _syncStartTime: 0,
    
    344 348
       _syncAnimationTimer: 0,
    
    345
    -  _obs: ["weave:engine:sync:finish", "quit-application", UIState.ON_UPDATE],
    
    349
    +  _obs: AppConstants.MOZ_SERVICES_SYNC
    
    350
    +    ? ["weave:engine:sync:finish", "quit-application", UIState.ON_UPDATE]
    
    351
    +    : [],
    
    346 352
     
    
    347 353
       get log() {
    
    348 354
         if (!this._log) {
    
    ... ... @@ -458,7 +464,7 @@ var gSync = {
    458 464
     
    
    459 465
         this._definePrefGetters();
    
    460 466
     
    
    461
    -    if (!this.FXA_ENABLED) {
    
    467
    +    if (!AppConstants.MOZ_SERVICES_SYNC || !this.FXA_ENABLED) {
    
    462 468
           this.onFxaDisabled();
    
    463 469
           return;
    
    464 470
         }
    
    ... ... @@ -1529,7 +1535,7 @@ var gSync = {
    1529 1535
         // can lead to a empty label for 'Send To Device' Menu.
    
    1530 1536
         this.init();
    
    1531 1537
     
    
    1532
    -    if (!this.FXA_ENABLED) {
    
    1538
    +    if (!AppConstants.MOZ_SERVICES_SYNC || !this.FXA_ENABLED) {
    
    1533 1539
           // These items are hidden in onFxaDisabled(). No need to do anything.
    
    1534 1540
           return;
    
    1535 1541
         }
    
    ... ... @@ -1564,7 +1570,7 @@ var gSync = {
    1564 1570
     
    
    1565 1571
       // "Send Page to Device" and "Send Link to Device" menu items
    
    1566 1572
       updateContentContextMenu(contextMenu) {
    
    1567
    -    if (!this.FXA_ENABLED) {
    
    1573
    +    if (!AppConstants.MOZ_SERVICES_SYNC || !this.FXA_ENABLED) {
    
    1568 1574
           // These items are hidden by default. No need to do anything.
    
    1569 1575
           return false;
    
    1570 1576
         }
    

  • browser/components/BrowserGlue.jsm
    ... ... @@ -791,10 +791,10 @@ if (AppConstants.TOR_BROWSER_UPDATE) {
    791 791
       };
    
    792 792
     }
    
    793 793
     
    
    794
    -XPCOMUtils.defineLazyGetter(
    
    795
    -  this,
    
    796
    -  "WeaveService",
    
    797
    -  () => Cc["@mozilla.org/weave/service;1"].getService().wrappedJSObject
    
    794
    +XPCOMUtils.defineLazyGetter(this, "WeaveService", () =>
    
    795
    +  AppConstants.MOZ_SERVICES_SYNC
    
    796
    +    ? Cc["@mozilla.org/weave/service;1"].getService().wrappedJSObject
    
    797
    +    : null
    
    798 798
     );
    
    799 799
     
    
    800 800
     if (AppConstants.MOZ_CRASHREPORTER) {
    
    ... ... @@ -2795,7 +2795,7 @@ BrowserGlue.prototype = {
    2795 2795
           // Schedule a sync (if enabled) after we've loaded
    
    2796 2796
           {
    
    2797 2797
             task: async () => {
    
    2798
    -          if (WeaveService.enabled) {
    
    2798
    +          if (WeaveService?.enabled) {
    
    2799 2799
                 await WeaveService.whenLoaded();
    
    2800 2800
                 WeaveService.Weave.Service.scheduler.autoConnect();
    
    2801 2801
               }
    

  • browser/installer/package-manifest.in
    ... ... @@ -181,7 +181,17 @@
    181 181
     @RESPATH@/browser/components/MacTouchBar.manifest
    
    182 182
     @RESPATH@/browser/components/MacTouchBar.js
    
    183 183
     #endif
    
    184
    +; TODO: Remove this in ESR-115.
    
    185
    +; If everything goes well, this patch will not be necessary in 115, because we
    
    186
    +; have also an upstream bug.
    
    187
    +; I suspect this is somehow incorrect, and that MOZ_SERVICES_SYNC is actually
    
    188
    +; never defined for the makefile (it is not for Firefox 112, which builds
    
    189
    +; correctly with MOZ_SERVICES_SYNC == False, even without this ifdef).
    
    190
    +; But we are interested in disabling it, so using either this, or #if 0 would be
    
    191
    +; fine for us.
    
    192
    +#ifdef MOZ_SERVICES_SYNC
    
    184 193
     @RESPATH@/components/SyncComponents.manifest
    
    194
    +#endif
    
    185 195
     @RESPATH@/components/servicesComponents.manifest
    
    186 196
     @RESPATH@/components/servicesSettings.manifest
    
    187 197
     @RESPATH@/components/cryptoComponents.manifest
    

  • browser/moz.configure
    ... ... @@ -7,7 +7,8 @@
    7 7
     imply_option("MOZ_PLACES", True)
    
    8 8
     # tor-browser#32493
    
    9 9
     imply_option("MOZ_SERVICES_HEALTHREPORT", False)
    
    10
    -imply_option("MOZ_SERVICES_SYNC", True)
    
    10
    +# tor-browser#41629
    
    11
    +imply_option("MOZ_SERVICES_SYNC", False)
    
    11 12
     imply_option("MOZ_DEDICATED_PROFILES", False)
    
    12 13
     imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", False)
    
    13 14
     # tor-browser#33734
    

  • toolkit/modules/moz.build
    ... ... @@ -293,6 +293,7 @@ for var in (
    293 293
     for var in (
    
    294 294
         "MOZ_ALLOW_ADDON_SIDELOAD",
    
    295 295
         "MOZ_BACKGROUNDTASKS",
    
    296
    +    "MOZ_SERVICES_SYNC",
    
    296 297
         "MOZ_SYSTEM_NSS",
    
    297 298
         "MOZ_SYSTEM_POLICIES",
    
    298 299
         "MOZ_UNSIGNED_APP_SCOPE",