diff --git a/common/bootstrap.js b/common/bootstrap.js index 837a2f39..d55734af 100755 --- a/common/bootstrap.js +++ b/common/bootstrap.js @@ -175,11 +175,11 @@ function init() { reportError(e); } - if (JSMLoader && JSMLoader.bump != 3) // Temporary hack + if (JSMLoader && JSMLoader.bump !== 4) // Temporary hack Services.scriptloader.loadSubScript("resource://dactyl" + suffix + "/bootstrap.jsm", Cu.import("resource://dactyl/bootstrap.jsm", global)); - if (!JSMLoader || JSMLoader.bump != 3) + if (!JSMLoader || JSMLoader.bump !== 4) Cu.import("resource://dactyl/bootstrap.jsm", global); JSMLoader.load("resource://dactyl/bootstrap.jsm", global); diff --git a/common/modules/bootstrap.jsm b/common/modules/bootstrap.jsm index 1d2a3110..45f065c7 100644 --- a/common/modules/bootstrap.jsm +++ b/common/modules/bootstrap.jsm @@ -14,9 +14,9 @@ var storage = Components.classes["@mozilla.org/fuel/application;1"] var JSMLoader = storage.get("dactyl.JSMLoader", undefined); -if (!JSMLoader || JSMLoader.bump != 3) +if (!JSMLoader || JSMLoader.bump != 4) JSMLoader = { - bump: 3, + bump: 4, builtin: Components.utils.Sandbox(this), canonical: {}, factories: [], @@ -33,7 +33,7 @@ if (!JSMLoader || JSMLoader.bump != 3) this.storage.set("dactyl.JSMLoader", this); - let base = JSMLoader.load("base.jsm", global); + let base = this.load("base.jsm", global); global.EXPORTED_SYMBOLS = base.EXPORTED_SYMBOLS; global.JSMLoader = this; base.JSMLoader = this; diff --git a/common/modules/config.jsm b/common/modules/config.jsm index 6e5645b2..74ced910 100644 --- a/common/modules/config.jsm +++ b/common/modules/config.jsm @@ -728,6 +728,6 @@ config.INIT = update(Object.create(config.INIT), config.INIT, { endModule(); -} catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } +} catch(e){ if (typeof e === "string") e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } // vim: set fdm=marker sw=4 sts=4 et ft=javascript: