summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-02-03 09:56:13 -0500
committerKris Maglione <maglione.k@gmail.com>2011-02-03 09:56:13 -0500
commit440f4872b14784a4df0e2cbc89030d2397abb75c (patch)
treeeeff7b9c0422b677bc3e28bb5a3a5bd5e2bcbd8c
parentd48dcd87239b5e6f8e067df53813a3c538615ffa (diff)
downloadpentadactyl-440f4872b14784a4df0e2cbc89030d2397abb75c.tar.gz
Fix unfortunate bug.
-rw-r--r--common/modules/overlay.jsm12
1 files changed, 9 insertions, 3 deletions
diff --git a/common/modules/overlay.jsm b/common/modules/overlay.jsm
index b3bbf863..267ad6b2 100644
--- a/common/modules/overlay.jsm
+++ b/common/modules/overlay.jsm
@@ -245,9 +245,15 @@ var Overlay = Module("Overlay", {
if (frame && frame.filename)
defineModule.loadLog.push(" from: " + util.fixURI(frame.filename) + ":" + frame.lineNumber);
- delete modules[module.className];
- // util.dump("INIT: " + module.className);
- modules[module.className] = defineModule.time(module.className, "init", module);
+ let obj = defineModule.time(module.className, "init", module);
+ try {
+ delete modules[module.className];
+ modules[module.className] = obj;
+ }
+ catch (e) {
+ Class.replaceProperty(modules, module.className, obj);
+ }
+
frob(module.className);
// init(modules[module.className]);