1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-27 08:45:45 +01:00

[bootstrap] Add code to manually reload stale cached modules on rehash.

--HG--
branch : bootstrapped
This commit is contained in:
Kris Maglione
2010-12-25 08:54:33 -05:00
parent 53786141e1
commit a759ab3606
14 changed files with 122 additions and 78 deletions

View File

@@ -4,14 +4,14 @@
// given in the LICENSE.txt file included with this file.
"use strict";
const Ci = Components.interfaces, Cc = Components.classes;
var Ci = Components.interfaces, Cc = Components.classes;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
const prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService)
var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService)
.getBranch("extensions.dactyl.");
const appName = prefs.getComplexValue("appName", Ci.nsISupportsString).data;
const name = prefs.getComplexValue("name", Ci.nsISupportsString).data;
var appName = prefs.getComplexValue("appName", Ci.nsISupportsString).data;
var name = prefs.getComplexValue("name", Ci.nsISupportsString).data;
function CommandLineHandler() {
this.wrappedJSObject = this;
@@ -45,9 +45,9 @@ CommandLineHandler.prototype = {
};
if (XPCOMUtils.generateNSGetFactory)
const NSGetFactory = XPCOMUtils.generateNSGetFactory([CommandLineHandler]);
var NSGetFactory = XPCOMUtils.generateNSGetFactory([CommandLineHandler]);
else
const NSGetModule = XPCOMUtils.generateNSGetModule([CommandLineHandler]);
var NSGetModule = XPCOMUtils.generateNSGetModule([CommandLineHandler]);
var EXPORTED_SYMBOLS = ["NSGetFactory"];
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -12,16 +12,16 @@
* By Kris Maglione, ideas from Ed Anuff's nsChromeExtensionHandler.
*/
const NAME = "protocols";
const global = this;
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
var NAME = "protocols";
var global = this;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
const systemPrincipal = Cc["@mozilla.org/systemprincipal;1"].getService(Ci.nsIPrincipal);
var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
var systemPrincipal = Cc["@mozilla.org/systemprincipal;1"].getService(Ci.nsIPrincipal);
function dataURL(type, data) "data:" + (type || "application/xml;encoding=UTF-8") + "," + escape(data);
function makeChannel(url, orig) {
@@ -204,9 +204,9 @@ Shim.prototype = {
};
if (XPCOMUtils.generateNSGetFactory)
const NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutHandler, ChromeData, Dactyl, Shim]);
var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutHandler, ChromeData, Dactyl, Shim]);
else
const NSGetModule = XPCOMUtils.generateNSGetModule([AboutHandler, ChromeData, Dactyl, Shim]);
var NSGetModule = XPCOMUtils.generateNSGetModule([AboutHandler, ChromeData, Dactyl, Shim]);
var EXPORTED_SYMBOLS = ["NSGetFactory"];
// vim: set fdm=marker sw=4 ts=4 et: