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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user