Engine_resetClient: async -> sync. SyncEngine__resetClient: async/yield -> sync.

This commit is contained in:
Edward Lee 2009-06-05 15:34:34 -07:00
parent 81f7652b56
commit 3d3f786723
2 changed files with 4 additions and 7 deletions

View File

@ -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();
}
};

View File

@ -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 {