зеркало из https://github.com/mozilla/gecko-dev.git
Bug 587027 - Use as little memory as possible (part 5)
Avoid accessing Weave.Service (=importing service.js) at all cost.
This commit is contained in:
Родитель
a39bd93a56
Коммит
4a9a61cc08
|
@ -67,7 +67,9 @@ WeaveService.prototype = {
|
||||||
this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||||
this.timer.initWithCallback({
|
this.timer.initWithCallback({
|
||||||
notify: function() {
|
notify: function() {
|
||||||
Cu.import("resource://services-sync/service.js");
|
Cu.import("resource://services-sync/main.js");
|
||||||
|
if (Weave.Status.checkSetup() != Weave.CLIENT_NOT_CONFIGURED)
|
||||||
|
Weave.Service;
|
||||||
}
|
}
|
||||||
}, 10000, Ci.nsITimer.TYPE_ONE_SHOT);
|
}, 10000, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче