зеркало из https://github.com/mozilla/gecko-dev.git
Bug 840643 - Fix exception in WeaveGlue.init that breaks Metro sync setup [r=ally]
This commit is contained in:
Родитель
487f6796a4
Коммит
0cde40a91f
|
@ -24,15 +24,10 @@ let WeaveGlue = {
|
|||
|
||||
if (service.ready) {
|
||||
this._init();
|
||||
return;
|
||||
} else {
|
||||
Services.obs.addObserver(this, "weave:service:ready", false);
|
||||
service.ensureLoaded();
|
||||
}
|
||||
|
||||
Services.obs.addObserver(function onReady() {
|
||||
Services.obs.removeObserver(onReady, "weave:service:ready");
|
||||
this._init();
|
||||
}.bind(this), "weave:service:ready", false);
|
||||
|
||||
service.ensureLoaded();
|
||||
},
|
||||
|
||||
_init: function () {
|
||||
|
@ -425,6 +420,12 @@ let WeaveGlue = {
|
|||
},
|
||||
|
||||
observe: function observe(aSubject, aTopic, aData) {
|
||||
if (aTopic == "weave:service:ready") {
|
||||
Services.obs.removeObserver(this, aTopic);
|
||||
this._init();
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure we're online when connecting/syncing
|
||||
Util.forceOnline();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче