summaryrefslogtreecommitdiff
path: root/common/modules/overlay.jsm
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-09-11 15:06:46 -0400
committerKris Maglione <maglione.k@gmail.com>2011-09-11 15:06:46 -0400
commit345cce5a421b9e1a56a1a071f02e5ec73474f43b (patch)
tree031b814916bbaaa42a58ac30ce8d3db4fd05b4b2 /common/modules/overlay.jsm
parent68d8bf74df55e8bf06ba8660010e6f28f99e598a (diff)
downloadpentadactyl-345cce5a421b9e1a56a1a071f02e5ec73474f43b.tar.gz
Don't Be Evil.
--HG-- rename : pentadactyl/skin/icon.png => pentadactyl/icon16.png
Diffstat (limited to 'common/modules/overlay.jsm')
-rw-r--r--common/modules/overlay.jsm7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/modules/overlay.jsm b/common/modules/overlay.jsm
index ed245550..3fa30c6b 100644
--- a/common/modules/overlay.jsm
+++ b/common/modules/overlay.jsm
@@ -150,11 +150,14 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
getData: function getData(obj, key, constructor) {
let { id } = this;
- if (!(id in obj))
+ if (!(id in obj && obj[id]))
obj[id] = {};
if (obj[id][key] === undefined)
- obj[id][key] = (constructor || Array)();
+ if (constructor === undefined || callable(constructor))
+ obj[id][key] = (constructor || Array)();
+ else
+ obj[id][key] = constructor;
return obj[id][key];
},