Richard Pospesel pushed to branch tor-browser-102.8.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
-
cc0c58ab
by Richard Pospesel at 2023-02-24T11:29:13+00:00
4 changed files:
- browser/base/content/browser-sync.js
- browser/components/BrowserGlue.jsm
- browser/installer/package-manifest.in
- toolkit/modules/moz.build
Changes:
| ... | ... | @@ -5,11 +5,7 @@ |
| 5 | 5 | // This file is loaded into the browser window scope.
|
| 6 | 6 | /* eslint-env mozilla/browser-window */
|
| 7 | 7 | |
| 8 | -ChromeUtils.defineModuleGetter(
|
|
| 9 | - this,
|
|
| 10 | - "UIState",
|
|
| 11 | - "resource://services-sync/UIState.jsm"
|
|
| 12 | -);
|
|
| 8 | +const { UIState } = ChromeUtils.import("resource://services-sync/UIState.jsm");
|
|
| 13 | 9 | |
| 14 | 10 | ChromeUtils.defineModuleGetter(
|
| 15 | 11 | this,
|
| ... | ... | @@ -346,9 +342,7 @@ var gSync = { |
| 346 | 342 | // once syncing completes (bug 1239042).
|
| 347 | 343 | _syncStartTime: 0,
|
| 348 | 344 | _syncAnimationTimer: 0,
|
| 349 | - _obs: AppConstants.MOZ_SERVICES_SYNC
|
|
| 350 | - ? ["weave:engine:sync:finish", "quit-application", UIState.ON_UPDATE]
|
|
| 351 | - : [],
|
|
| 345 | + _obs: ["weave:engine:sync:finish", "quit-application", UIState.ON_UPDATE],
|
|
| 352 | 346 | |
| 353 | 347 | get log() {
|
| 354 | 348 | if (!this._log) {
|
| ... | ... | @@ -464,7 +458,7 @@ var gSync = { |
| 464 | 458 | |
| 465 | 459 | this._definePrefGetters();
|
| 466 | 460 | |
| 467 | - if (!AppConstants.MOZ_SERVICES_SYNC || !this.FXA_ENABLED) {
|
|
| 461 | + if (!this.FXA_ENABLED) {
|
|
| 468 | 462 | this.onFxaDisabled();
|
| 469 | 463 | return;
|
| 470 | 464 | }
|
| ... | ... | @@ -1535,7 +1529,7 @@ var gSync = { |
| 1535 | 1529 | // can lead to a empty label for 'Send To Device' Menu.
|
| 1536 | 1530 | this.init();
|
| 1537 | 1531 | |
| 1538 | - if (!AppConstants.MOZ_SERVICES_SYNC || !this.FXA_ENABLED) {
|
|
| 1532 | + if (!this.FXA_ENABLED) {
|
|
| 1539 | 1533 | // These items are hidden in onFxaDisabled(). No need to do anything.
|
| 1540 | 1534 | return;
|
| 1541 | 1535 | }
|
| ... | ... | @@ -1570,7 +1564,7 @@ var gSync = { |
| 1570 | 1564 | |
| 1571 | 1565 | // "Send Page to Device" and "Send Link to Device" menu items
|
| 1572 | 1566 | updateContentContextMenu(contextMenu) {
|
| 1573 | - if (!AppConstants.MOZ_SERVICES_SYNC || !this.FXA_ENABLED) {
|
|
| 1567 | + if (!this.FXA_ENABLED) {
|
|
| 1574 | 1568 | // These items are hidden by default. No need to do anything.
|
| 1575 | 1569 | return false;
|
| 1576 | 1570 | }
|
| ... | ... | @@ -791,10 +791,10 @@ if (AppConstants.TOR_BROWSER_UPDATE) { |
| 791 | 791 | };
|
| 792 | 792 | }
|
| 793 | 793 | |
| 794 | -XPCOMUtils.defineLazyGetter(this, "WeaveService", () =>
|
|
| 795 | - AppConstants.MOZ_SERVICES_SYNC
|
|
| 796 | - ? Cc["@mozilla.org/weave/service;1"].getService().wrappedJSObject
|
|
| 797 | - : null
|
|
| 794 | +XPCOMUtils.defineLazyGetter(
|
|
| 795 | + this,
|
|
| 796 | + "WeaveService",
|
|
| 797 | + () => Cc["@mozilla.org/weave/service;1"].getService().wrappedJSObject
|
|
| 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 | }
|
| ... | ... | @@ -181,17 +181,7 @@ |
| 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
|
|
| 193 | 184 | @RESPATH@/components/SyncComponents.manifest
|
| 194 | -#endif
|
|
| 195 | 185 | @RESPATH@/components/servicesComponents.manifest
|
| 196 | 186 | @RESPATH@/components/servicesSettings.manifest
|
| 197 | 187 | @RESPATH@/components/cryptoComponents.manifest
|
| ... | ... | @@ -293,7 +293,6 @@ for var in ( |
| 293 | 293 | for var in (
|
| 294 | 294 | "MOZ_ALLOW_ADDON_SIDELOAD",
|
| 295 | 295 | "MOZ_BACKGROUNDTASKS",
|
| 296 | - "MOZ_SERVICES_SYNC",
|
|
| 297 | 296 | "MOZ_SYSTEM_NSS",
|
| 298 | 297 | "MOZ_SYSTEM_POLICIES",
|
| 299 | 298 | "MOZ_UNSIGNED_APP_SCOPE",
|