X-Git-Url: https://git.donarmstrong.com/?p=dactyl.git;a=blobdiff_plain;f=common%2Fmodules%2Fstorage.jsm;h=f37524d843e79186c40ad36c5e02627b775f2276;hp=0f4cc06e7a83a41c0ca3e89dada9b422948c613e;hb=3d837eb266a3a01d424192aa4ec1a167366178c5;hpb=d8a3bcebff36df7b128b36e0b57b715479e155a0 diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm index 0f4cc06..f37524d 100644 --- a/common/modules/storage.jsm +++ b/common/modules/storage.jsm @@ -162,7 +162,7 @@ var ObjectStore = Class("ObjectStore", StoreBase, { } }); -var sessionGlobal = Cu.import("resource://gre/modules/Services.jsm", {}) +var sessionGlobal = Cu.import("resource://gre/modules/Services.jsm", {}); var Storage = Module("Storage", { Local: function Local(dactyl, modules, window) ({ @@ -241,7 +241,6 @@ var Storage = Module("Storage", { }, newObject: function newObject(key, constructor, params) { - let self = this; if (params == null || !isObject(params)) throw Error("Invalid argument type"); @@ -261,10 +260,10 @@ var Storage = Module("Storage", { if (key in this && !reload) throw Error("Cannot add storage key with that name."); - let load = function () self._loadData(key, params.store, params.type || myObject); + let load = () => this._loadData(key, params.store, params.type || myObject); this.keys[key] = new constructor(key, params.store, load, params); - this.keys[key].timer = new Timer(1000, 10000, function () self.save(key)); + this.keys[key].timer = new Timer(1000, 10000, () => this.save(key)); this.__defineGetter__(key, function () this.keys[key]); } return this.keys[key]; @@ -762,7 +761,6 @@ var File = Class("File", { } }, - isAbsolutePath: function isAbsolutePath(path) { try { services.File().initWithPath(path); @@ -793,7 +791,7 @@ let (file = services.directory.get("ProfD", Ci.nsIFile)) { if (!(prop in File.prototype)) { let isFunction; try { - isFunction = callable(file[prop]) + isFunction = callable(file[prop]); } catch (e) {} @@ -814,4 +812,4 @@ endModule(); // catch(e){ dump(e + "\n" + (e.stack || Error().stack)); Components.utils.reportError(e) } -// vim: set fdm=marker sw=4 sts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: