Bug 1419990 - Only sync the tabs collection on sleep if there are changes. r=markh

MozReview-Commit-ID: GC0KMmQPqqD

--HG--
extra : rebase_source : 2039c7f644b3510dda07839c1e561786ad8c0ba1
This commit is contained in:
Edouard Oger 2017-11-23 11:24:41 -05:00
parent b518aa7ee2
commit 438ca97ce7

View File

@ -392,8 +392,10 @@ SyncScheduler.prototype = {
this.scheduleNextSync(3000);
});
case "sleep_notification":
this._log.debug("Going to sleep, doing a quick sync.");
this.scheduleNextSync(0, ["tabs"], "sleep");
if (this.service.engineManager.get("tabs")._tracker.modified) {
this._log.debug("Going to sleep, doing a quick sync.");
this.scheduleNextSync(0, ["tabs"], "sleep");
}
break;
}
},