diff --git a/common/bootstrap.js b/common/bootstrap.js index e0564e1a..466ce387 100755 --- a/common/bootstrap.js +++ b/common/bootstrap.js @@ -263,6 +263,7 @@ function init() { else { bootstrap = Cu.Sandbox(Cc["@mozilla.org/systemprincipal;1"].createInstance(), { sandboxName: BOOTSTRAP, + addonId: addon.id, metadata: { addonID: addon.id } }); Services.scriptloader.loadSubScript(BOOTSTRAP, bootstrap); } @@ -407,8 +408,8 @@ FactoryProxy.prototype = { return this.module; }, createInstance: function (iids) { - return let (factory = this.module.NSGetFactory(this.classID)) - factory.createInstance.apply(factory, arguments); + let factory = this.module.NSGetFactory(this.classID); + return factory.createInstance.apply(factory, arguments); } } diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm index 5db7d45a..8cfdcb06 100644 --- a/common/modules/buffer.jsm +++ b/common/modules/buffer.jsm @@ -256,7 +256,7 @@ var Buffer = Module("Buffer", { /** * @property {nsIURI} The current top-level document's URI. */ - get uri() util.newURI(this.win.location.href), + get uri() util.newURI(this.win.location.href), /** * @property {nsIURI} The current top-level document's URI, sans diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm index 1336449a..a5b0b499 100644 --- a/common/modules/commands.jsm +++ b/common/modules/commands.jsm @@ -1406,9 +1406,9 @@ var Commands = Module("commands", { // Fix me. if (isString(sep)) - sep = RegExp(sep); + sep = RegExp(sep || "(?:)"); sep = sep != null ? sep : /\s/; - let re1 = RegExp("^" + (sep.source === "" ? "(?!)" : sep.source)); + let re1 = RegExp("^" + (sep.source === "(?:)" ? "(?!)" : sep.source)); let re2 = RegExp(/^()((?:[^\\S"']|\\.)+)((?:\\$)?)/.source.replace("S", sep.source)); while (str.length && !re1.test(str)) { diff --git a/common/modules/util.jsm b/common/modules/util.jsm index a64674e5..762fe243 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -798,7 +798,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), if (params.user != null || params.pass != null) args.push(params.user); if (params.pass != null) - args.push(prams.pass); + args.push(params.pass); apply(xmlhttp, "open", args);