This commit is contained in:
jonathandicarlo@jonathan-dicarlos-macbook-pro.local 2009-01-08 16:59:56 -08:00
Родитель 6bb955a067 f6e8ce42c6
Коммит 55d3388e52
3 изменённых файлов: 20 добавлений и 29 удалений

Просмотреть файл

@ -96,7 +96,7 @@ ClientStore.prototype = {
}, },
_ClientStore_init: function ClientStore__init() { _ClientStore_init: function ClientStore__init() {
this.__proto__.__proto__._init.call(this); this._init.call(this);
this.clients = {}; this.clients = {};
this.loadSnapshot(); this.loadSnapshot();
}, },

Просмотреть файл

@ -50,17 +50,17 @@ Cu.import("resource://weave/constants.js");
Function.prototype.async = Async.sugar; Function.prototype.async = Async.sugar;
function TabEngine(pbeId) { function TabEngine() {
this._init(pbeId); this._init();
} }
TabEngine.prototype = { TabEngine.prototype = {
__proto__: new BlobEngine(), __proto__: SyncEngine.prototype,
name: "tabs",
get name() "tabs", displayName: "Tabs",
get displayName() { return "Tabs"; }, logName: "Tabs",
get logName() "TabEngine", _storeObj: TabStore,
get serverPrefix() "user-data/tabs/", _trackerObj: TabTracker,
_recordObj: ClientTabsRecord
get virtualTabs() { get virtualTabs() {
let virtualTabs = {}; let virtualTabs = {};
@ -76,28 +76,15 @@ TabEngine.prototype = {
} }
} }
return virtualTabs; return virtualTabs;
},
get _store() {
let store = new TabStore();
this.__defineGetter__("_store", function() store);
return this._store;
},
get _tracker() {
let tracker = new TabTracker(this);
this.__defineGetter__("_tracker", function() tracker);
return this._tracker;
} }
}; };
function TabStore() { function TabStore() {
this._init(); this._TabStore_init();
} }
TabStore.prototype = { TabStore.prototype = {
__proto__: new Store(), __proto__: new Store(),
_logName: "TabStore", _logName: "Tabs.Store",
get _sessionStore() { get _sessionStore() {
let sessionStore = Cc["@mozilla.org/browser/sessionstore;1"]. let sessionStore = Cc["@mozilla.org/browser/sessionstore;1"].

Просмотреть файл

@ -474,10 +474,14 @@ WeaveSvc.prototype = {
this._log.debug("Logging in user " + this.username); this._log.debug("Logging in user " + this.username);
yield this.verifyLogin(self.cb, this.username, this.password); try {
yield this.verifyLogin(self.cb, this.username, this.password);
this._loggedIn = true; this._loggedIn = true;
self.done(true); self.done(true);
} catch (e) {
this._loggedIn = false;
self.done(false);
}
}; };
this._localLock( this._localLock(
this._catchAll( this._catchAll(