Bug 1180715 (3/4) - Drop parseURI from newChannel2. review=ttaubert

Extract the nsIFile from aURI instead.
This commit is contained in:
Oliver Henshaw 2015-10-20 10:45:46 +05:30
parent e05518af25
commit 7247d368b4

View File

@ -83,9 +83,8 @@ Protocol.prototype = {
* @return The newly created channel.
*/
newChannel2: function Proto_newChannel2(aURI, aLoadInfo) {
let {url} = parseURI(aURI);
let file = PageThumbsStorage.getFilePathForURL(url);
let fileuri = Services.io.newFileURI(new FileUtils.File(file));
let {file} = aURI.QueryInterface(Ci.nsIFileURL);
let fileuri = Services.io.newFileURI(file);
let channel = Services.io.newChannelFromURIWithLoadInfo(fileuri, aLoadInfo);
channel.originalURI = aURI;
return channel;