1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 21:37:58 +01:00

Closes issue #851.

--HG--
extra : source : 587422f9c39dbbff30eb28766e8624b0ab71cdca
This commit is contained in:
Kris Maglione
2012-10-02 19:16:02 -07:00
parent ad552d2986
commit 88b3f6c835

8
common/bootstrap.js vendored
View File

@@ -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];