diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 0505f40a..1b45c777 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -298,7 +298,7 @@ const Dactyl = Module("dactyl", { if (!context) context = userContext; context[EVAL_STRING] = str; - return Cu.evalInSandbox("with (window) { eval(" + EVAL_STRING + ") }", context, "1.8", fileName, lineNumber); + return Cu.evalInSandbox("eval('with (window) {'+" + EVAL_STRING + "+'}')", context, "1.8", fileName, lineNumber); }, /** diff --git a/common/content/io.js b/common/content/io.js index d373120d..43d20ec6 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -160,7 +160,7 @@ const IO = Module("io", { getRuntimeDirectories: function (name) { let dirs = options["runtimepath"]; - dirs = dirs.map(function (dir) File.joinPaths(dir, name, this.cwd)) + dirs = dirs.map(function (dir) File.joinPaths(dir, name, this.cwd), this) .filter(function (dir) dir.exists() && dir.isDirectory() && dir.isReadable()); return dirs; }, diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm index 96a142e0..d5d7f711 100644 --- a/common/modules/highlight.jsm +++ b/common/modules/highlight.jsm @@ -147,11 +147,13 @@ const Highlights = Module("Highlight", { * * @param {string} class */ - selector: function (class_) - class_.replace(/(^|\s)([A-Z]\w+)\b/g, + selector: function (class_) { + const self = this; + return class_.replace(/(^|\s)([A-Z]\w+)\b/g, function (m, n1, hl) n1 + - (this.highlight[hl] && this.highlight[hl].class != class_ - ? this.highlight[hl] : "[dactyl|highlight~=" + hl + "]")), + (self.highlight[hl] && self.highlight[hl].class != class_ + ? self.highlight[hl] : "[dactyl|highlight~=" + hl + "]")); + }, /** * Clears all highlighting rules. Rules with default values are diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm index 0cd800e6..008fcedc 100644 --- a/common/modules/storage.jsm +++ b/common/modules/storage.jsm @@ -282,7 +282,7 @@ const File = Class("File", { return null; } } - let self = XPCSafeJSObjectWrapper(file); + let self = XPCNativeWrapper(file); self.__proto__ = File.prototype; return self; },