diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-01-13 16:04:32 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-01-13 16:04:32 -0500 |
commit | 6fcd00e8ca2d56bfa5583d70ba2e8cdfee4801ad (patch) | |
tree | 46a3a2fd8cd2d44a8b97783114c6f944a637a7e9 /common/modules/bootstrap.jsm | |
parent | 203730ae6252d37dfe6fc6eb80af8775e861daf3 (diff) | |
download | pentadactyl-6fcd00e8ca2d56bfa5583d70ba2e8cdfee4801ad.tar.gz |
Ditch the bloody chrome registry.
Diffstat (limited to 'common/modules/bootstrap.jsm')
-rw-r--r-- | common/modules/bootstrap.jsm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/common/modules/bootstrap.jsm b/common/modules/bootstrap.jsm index aa505622..dac2201f 100644 --- a/common/modules/bootstrap.jsm +++ b/common/modules/bootstrap.jsm @@ -52,15 +52,21 @@ if (!JSMLoader || JSMLoader.bump != 1) .getService(Components.interfaces.mozIJSSubScriptLoader) .loadSubScript(url, global.global || global); } - let global = Components.utils.import(url, target); + try { + let global = Components.utils.import(url, target); - if (name == "base.jsm") { - global.JSMLoader = this; - Components.utils.import(url, this.global); - this.global.EXPORTED_SYMBOLS = global.EXPORTED_SYMBOLS; - } + if (name == "base.jsm") { + global.JSMLoader = this; + Components.utils.import(url, this.global); + this.global.EXPORTED_SYMBOLS = global.EXPORTED_SYMBOLS; + } - return this.globals[url] = global; + return this.globals[url] = global; + } + catch (e) { + dump("Importing " + url + ": " + e + "\n" + (e.stack || Error().stack)); + throw e; + } }, cleanup: function unregister() { for each (let factory in this.factories.splice(0)) |