Bug 1420349 - Instantiate the sync scheduler in the service's constructor, instead of in onStartup. r?eoger
MozReview-Commit-ID: 3bOnRH5jR9e
--- a/services/sync/modules/service.js
+++ b/services/sync/modules/service.js
@@ -64,16 +64,17 @@ function getEngineModules() {
// A unique identifier for this browser session. Used for logging so
// we can easily see whether 2 logs are in the same browser session or
// after the browser restarted.
XPCOMUtils.defineLazyGetter(this, "browserSessionID", Utils.makeGUID);
function Sync11Service() {
this._notify = Utils.notify("weave:service:");
+ this.scheduler = new SyncScheduler(this);
}
Sync11Service.prototype = {
_lock: Utils.lock,
_locked: false,
_loggedIn: false,
infoURL: null,
@@ -317,18 +318,16 @@ Sync11Service.prototype = {
"Weave, since it will not work correctly.");
}
Svc.Obs.add("weave:service:setup-complete", this);
Svc.Obs.add("sync:collection_changed", this); // Pulled from FxAccountsCommon
Svc.Obs.add("fxaccounts:device_disconnected", this);
Services.prefs.addObserver(PREFS_BRANCH + "engine.", this);
- this.scheduler = new SyncScheduler(this);
-
if (!this.enabled) {
this._log.info("Firefox Sync disabled.");
}
this._updateCachedURLs();
let status = this._checkSetup();
if (status != STATUS_DISABLED && status != CLIENT_NOT_CONFIGURED) {