From 88b3f6c8357b75dd3afcc07e7906539d5c300ce9 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 2 Oct 2012 19:16:02 -0700 Subject: [PATCH] Closes issue #851. --HG-- extra : source : 587422f9c39dbbff30eb28766e8624b0ab71cdca --- common/bootstrap.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/bootstrap.js b/common/bootstrap.js index d65059d6..3d586d98 100755 --- a/common/bootstrap.js +++ b/common/bootstrap.js @@ -94,7 +94,11 @@ let JSMLoader = { }, getTarget: function getTarget(url) { - let chan = Services.io.newChannel(url, null, null); + let uri = Services.io.newURI(url, null, null); + if (uri.schemeIs("resource")) + return resourceProto.resolveURI(uri); + + let chan = Services.io.newChannelFromURI(uri); try { chan.cancel(Cr.NS_BINDING_ABORTED) } catch (e) {} return chan.name; }, @@ -121,7 +125,7 @@ let JSMLoader = { for each (let url in urls) try { - var uri = resourceProto.resolveURI(Services.io.newURI(url, null, null)); + var uri = this.getTarget(url); if (uri in this.globals) return this.modules[name] = this.globals[uri];