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

Fix live XPI update.

This commit is contained in:
Kris Maglione
2011-02-23 20:40:09 -05:00
parent 80ca9194ec
commit d9fe3a736e
4 changed files with 11 additions and 9 deletions

View File

@@ -7,18 +7,20 @@
try {
var EXPORTED_SYMBOLS = ["JSMLoader"];
var global = this;
var BOOTSTRAP_CONTRACT = "@dactyl.googlecode.com/base/bootstrap";
var JSMLoader = BOOTSTRAP_CONTRACT in Components.classes &&
Components.classes[BOOTSTRAP_CONTRACT].getService().wrappedJSObject.loader;
if (!JSMLoader || JSMLoader.bump != 4)
if (JSMLoader && JSMLoader.bump === 4)
JSMLoader.global = this;
else
JSMLoader = {
bump: 4,
builtin: Components.utils.Sandbox(this),
canonical: {},
factories: [],
global: this,
globals: JSMLoader ? JSMLoader.globals : {},
io: Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService),
loader: Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader),
@@ -29,9 +31,9 @@ if (!JSMLoader || JSMLoader.bump != 4)
this.initialized = true;
this.suffix = suffix || "";
let base = this.load("base.jsm", global);
global.EXPORTED_SYMBOLS = base.EXPORTED_SYMBOLS;
global.JSMLoader = this;
let base = this.load("base.jsm", this.global);
this.global.EXPORTED_SYMBOLS = base.EXPORTED_SYMBOLS;
this.global.JSMLoader = this;
base.JSMLoader = this;
},
getTarget: function getTarget(url) {