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

Because I can.

This commit is contained in:
Kris Maglione
2011-08-21 00:47:18 -04:00
parent cef61c8733
commit 1607affa58
19 changed files with 802 additions and 786 deletions

View File

@@ -19,11 +19,11 @@ if (!JSMLoader && "@mozilla.org/fuel/application;1" in Components.classes)
.getService(Components.interfaces.extIApplication)
.storage.get("dactyl.JSMLoader", null);
if (JSMLoader && JSMLoader.bump === 5)
if (JSMLoader && JSMLoader.bump === 6)
JSMLoader.global = this;
else
JSMLoader = {
bump: 5,
bump: 6,
builtin: Cu.Sandbox(this),
@@ -167,6 +167,24 @@ else
}
},
Factory: function Factory(clas) ({
__proto__: clas.prototype,
createInstance: function (outer, iid) {
try {
if (outer != null)
throw Cr.NS_ERROR_NO_AGGREGATION;
if (!clas.instance)
clas.instance = new clas();
return clas.instance.QueryInterface(iid);
}
catch (e) {
Cu.reportError(e);
throw e;
}
}
}),
registerFactory: function registerFactory(factory) {
this.manager.registerFactory(factory.classID,
String(factory.classID),