1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 05:24:12 +01:00

Get rid of apparently redundant QIs.

This commit is contained in:
Kris Maglione
2011-03-19 01:12:22 -04:00
parent b7eb21139a
commit 57dbc1b913
5 changed files with 10 additions and 11 deletions

View File

@@ -779,12 +779,12 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
uri = util.newURI(util.fixURI(uri));
if (uri instanceof Ci.nsIFileURL)
return File(uri.QueryInterface(Ci.nsIFileURL).file);
return File(uri.file);
let channel = services.io.newChannelFromURI(uri);
channel.cancel(Cr.NS_BINDING_ABORTED);
if (channel instanceof Ci.nsIFileChannel)
return File(channel.QueryInterface(Ci.nsIFileChannel).file);
return File(channel.file);
}
catch (e) {}
return null;