diff options
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)) |