зеркало из 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
|
||||
*/
|
||||
resetClient: function Engine_resetClient(onComplete) {
|
||||
resetClient: function Engine_resetClient() {
|
||||
if (!this._resetClient)
|
||||
throw "engine does not implement _resetClient method";
|
||||
|
||||
this._notifyAsync("reset-client", this.name, this._resetClient).
|
||||
async(this, onComplete);
|
||||
this._notify("reset-client", this.name, this._resetClient)();
|
||||
},
|
||||
|
||||
_wipeClient: function Engine__wipeClient() {
|
||||
let self = yield;
|
||||
|
||||
yield this.resetClient(self.cb);
|
||||
|
||||
this.resetClient();
|
||||
this._log.debug("Deleting all local data");
|
||||
this._store.wipe();
|
||||
},
|
||||
|
@ -532,7 +530,6 @@ SyncEngine.prototype = {
|
|||
},
|
||||
|
||||
_resetClient: function SyncEngine__resetClient() {
|
||||
let self = yield;
|
||||
this.resetLastSync();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1127,7 +1127,7 @@ WeaveSvc.prototype = {
|
|||
|
||||
// Have each engine drop any temporary meta data
|
||||
for each (let engine in engines)
|
||||
yield engine.resetClient(self.cb);
|
||||
engine.resetClient();
|
||||
|
||||
// XXX Bug 480448: Delete any snapshots from old code
|
||||
try {
|
||||
|
|
Загрузка…
Ссылка в новой задаче