diff --git a/common/bootstrap.js b/common/bootstrap.js index 03e85b20..fbbabbeb 100755 --- a/common/bootstrap.js +++ b/common/bootstrap.js @@ -238,15 +238,13 @@ function init() { JSMLoader.load("base.jsm", global); if (!(BOOTSTRAP_CONTRACT in Cc)) { - let factory = { - classID: Components.ID("{f541c8b0-fe26-4621-a30b-e77d21721fb5}"), - contractID: BOOTSTRAP_CONTRACT, - QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory]), + // Use Sandbox to prevent closures over this scope + let sandbox = Cu.Sandbox(Cc["@mozilla.org/systemprincipal;1"].getService()); + let factory = Cu.evalInSandbox("({ createInstance: function () this })", sandbox); - // Use Sandbox to prevent closures over this scope - createInstance: Cu.evalInSandbox("(function () this)", - Cu.Sandbox(Cc["@mozilla.org/systemprincipal;1"].getService())) - }; + factory.classID = Components.ID("{f541c8b0-fe26-4621-a30b-e77d21721fb5}"); + factory.contractID = BOOTSTRAP_CONTRACT; + factory.QueryInterface = XPCOMUtils.generateQI([Ci.nsIFactory]); factory.wrappedJSObject = factory; manager.registerFactory(factory.classID, String(factory.classID), diff --git a/common/modules/options.jsm b/common/modules/options.jsm index dabd29a5..920d3565 100644 --- a/common/modules/options.jsm +++ b/common/modules/options.jsm @@ -1101,6 +1101,7 @@ var Options = Module("options", { invertBoolean = (postfix == "!"); } + name = Option.dequote(name); if (name == "all" && reset) modules.commandline.input(_("pref.prompt.resetAll", config.host) + " ", function (resp) { diff --git a/common/modules/services.jsm b/common/modules/services.jsm index 00ed5e8e..8d9273bb 100644 --- a/common/modules/services.jsm +++ b/common/modules/services.jsm @@ -48,6 +48,7 @@ var Services = Module("Services", { this.add("json", "@mozilla.org/dom/json;1", "nsIJSON", "createInstance"); this.add("listeners", "@mozilla.org/eventlistenerservice;1", "nsIEventListenerService"); this.add("livemark", "@mozilla.org/browser/livemark-service;2", "nsILivemarkService"); + this.add("messages", "@mozilla.org/globalmessagemanager;1", "nsIChromeFrameMessageManager"); this.add("mime", "@mozilla.org/mime;1", "nsIMIMEService"); this.add("observer", "@mozilla.org/observer-service;1", "nsIObserverService"); this.add("pref", "@mozilla.org/preferences-service;1", ["nsIPrefBranch2", "nsIPrefService"]); diff --git a/common/modules/util.jsm b/common/modules/util.jsm index 72a40bd2..bd9e6ef0 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -422,7 +422,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), * @returns [string] The resulting strings. */ debrace: function debrace(pattern) { - let res = []; + var res = []; if (isArray(pattern)) { let rec = function rec(acc) { @@ -1117,10 +1117,13 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), }), /** - * Flushes the startup cache. + * Flushes the startup or jar cache. */ - flushCache: function flushCache() { - services.observer.notifyObservers(null, "startupcache-invalidate", ""); + flushCache: function flushCache(file) { + if (file) + services.observer.notifyObservers(file, "flush-cache-entry", ""); + else + services.observer.notifyObservers(null, "startupcache-invalidate", ""); }, /**