зеркало из https://github.com/mozilla/gecko-dev.git
Engine_resetClient: async -> sync. SyncEngine__resetClient: async/yield -> sync.
This commit is contained in:
Родитель
ddede5e342
Коммит
a5bc6c458e
|
@ -203,19 +203,17 @@ Engine.prototype = {
|
||||||
/**
|
/**
|
||||||
* Get rid of any local meta-data
|
* Get rid of any local meta-data
|
||||||
*/
|
*/
|
||||||
resetClient: function Engine_resetClient(onComplete) {
|
resetClient: function Engine_resetClient() {
|
||||||
if (!this._resetClient)
|
if (!this._resetClient)
|
||||||
throw "engine does not implement _resetClient method";
|
throw "engine does not implement _resetClient method";
|
||||||
|
|
||||||
this._notifyAsync("reset-client", this.name, this._resetClient).
|
this._notify("reset-client", this.name, this._resetClient)();
|
||||||
async(this, onComplete);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_wipeClient: function Engine__wipeClient() {
|
_wipeClient: function Engine__wipeClient() {
|
||||||
let self = yield;
|
let self = yield;
|
||||||
|
|
||||||
yield this.resetClient(self.cb);
|
this.resetClient();
|
||||||
|
|
||||||
this._log.debug("Deleting all local data");
|
this._log.debug("Deleting all local data");
|
||||||
this._store.wipe();
|
this._store.wipe();
|
||||||
},
|
},
|
||||||
|
@ -532,7 +530,6 @@ SyncEngine.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_resetClient: function SyncEngine__resetClient() {
|
_resetClient: function SyncEngine__resetClient() {
|
||||||
let self = yield;
|
|
||||||
this.resetLastSync();
|
this.resetLastSync();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1127,7 +1127,7 @@ WeaveSvc.prototype = {
|
||||||
|
|
||||||
// Have each engine drop any temporary meta data
|
// Have each engine drop any temporary meta data
|
||||||
for each (let engine in engines)
|
for each (let engine in engines)
|
||||||
yield engine.resetClient(self.cb);
|
engine.resetClient();
|
||||||
|
|
||||||
// XXX Bug 480448: Delete any snapshots from old code
|
// XXX Bug 480448: Delete any snapshots from old code
|
||||||
try {
|
try {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче