mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 16:52:27 +01:00
Fix about:pentadactyl by registering the component manually. Et cetera.
This commit is contained in:
31
common/bootstrap.js
vendored
31
common/bootstrap.js
vendored
@@ -88,28 +88,16 @@ FactoryProxy.prototype = {
|
||||
QueryInterface: XPCOMUtils.generateQI(Ci.nsIFactory),
|
||||
register: function () {
|
||||
dump("dactyl: bootstrap: register: " + this.classID + " " + this.contractID + "\n");
|
||||
manager.registerFactory(this.classID,
|
||||
String(this.classID),
|
||||
this.contractID,
|
||||
this);
|
||||
},
|
||||
unregister: function () {
|
||||
dump("dactyl: bootstrap: unregister: " + this.classID + " " + this.contractID + "\n");
|
||||
manager.unregisterFactory(this.classID, this);
|
||||
|
||||
JSMLoader.registerFactory(this);
|
||||
},
|
||||
get module() {
|
||||
try {
|
||||
dump("dactyl: bootstrap: create module: " + this.contractID + "\n");
|
||||
Object.defineProperty(this, "module", { value: {}, enumerable: true });
|
||||
JSMLoader.load(this.url, this.module);
|
||||
JSMLoader.registerGlobal(this.url, this.module.global);
|
||||
return this.module;
|
||||
}
|
||||
catch (e) {
|
||||
delete this.module;
|
||||
reportError(e);
|
||||
throw e;
|
||||
}
|
||||
dump("dactyl: bootstrap: create module: " + this.contractID + "\n");
|
||||
|
||||
Object.defineProperty(this, "module", { value: {}, enumerable: true });
|
||||
JSMLoader.load(this.url, this.module);
|
||||
JSMLoader.registerGlobal(this.url, this.module.global);
|
||||
return this.module;
|
||||
},
|
||||
createInstance: function (iids) {
|
||||
return let (factory = this.module.NSGetFactory(this.classID))
|
||||
@@ -194,9 +182,6 @@ function shutdown(data, reason) {
|
||||
|
||||
services.observer.notifyObservers(null, "dactyl-cleanup", null);
|
||||
services.observer.notifyObservers(null, "dactyl-cleanup-modules", null);
|
||||
for (let factory in values(components))
|
||||
// TODO: Categories;
|
||||
factory.unregister();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user