mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-18 13:55:45 +01:00
Fix bugs and stuff.
This commit is contained in:
@@ -176,6 +176,8 @@ var ObjectStore = Class("ObjectStore", StoreBase, {
|
||||
}
|
||||
});
|
||||
|
||||
var sessionGlobal = Cu.import("resource://gre/modules/Services.jsm", {})
|
||||
|
||||
var Storage = Module("Storage", {
|
||||
alwaysReload: {},
|
||||
|
||||
@@ -184,7 +186,7 @@ var Storage = Module("Storage", {
|
||||
|
||||
let { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
if (!Services.dactylSession)
|
||||
Services.dactylSession = {};
|
||||
Services.dactylSession = Cu.createObjectIn(sessionGlobal);
|
||||
this.session = Services.dactylSession;
|
||||
},
|
||||
|
||||
@@ -201,6 +203,13 @@ var Storage = Module("Storage", {
|
||||
this.observers = {};
|
||||
},
|
||||
|
||||
storeForSession: function storeForSession(key, val) {
|
||||
if (val)
|
||||
this.session[key] = sessionGlobal.JSON.parse(JSON.stringify(val));
|
||||
else
|
||||
delete this.dactylSession[key];
|
||||
},
|
||||
|
||||
infoPath: Class.Memoize(function ()
|
||||
File(IO.runtimePath.replace(/,.*/, ""))
|
||||
.child("info").child(config.profileName)),
|
||||
|
||||
Reference in New Issue
Block a user