mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 21:57:58 +01:00
Closes issue #851.
--HG-- extra : source : 587422f9c39dbbff30eb28766e8624b0ab71cdca
This commit is contained in:
8
common/bootstrap.js
vendored
8
common/bootstrap.js
vendored
@@ -94,7 +94,11 @@ let JSMLoader = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getTarget: function getTarget(url) {
|
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) {}
|
try { chan.cancel(Cr.NS_BINDING_ABORTED) } catch (e) {}
|
||||||
return chan.name;
|
return chan.name;
|
||||||
},
|
},
|
||||||
@@ -121,7 +125,7 @@ let JSMLoader = {
|
|||||||
|
|
||||||
for each (let url in urls)
|
for each (let url in urls)
|
||||||
try {
|
try {
|
||||||
var uri = resourceProto.resolveURI(Services.io.newURI(url, null, null));
|
var uri = this.getTarget(url);
|
||||||
if (uri in this.globals)
|
if (uri in this.globals)
|
||||||
return this.modules[name] = this.globals[uri];
|
return this.modules[name] = this.globals[uri];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user