зеркало из https://github.com/mozilla/pjs.git
[OS/2] Bug 565847 - follow-up for icondecoder changes, r=joshmoz
This commit is contained in:
Родитель
01d549a69f
Коммит
47ed5517b6
|
@ -228,17 +228,17 @@ nsresult nsIconChannel::ExtractIconInfoFromUrl(nsIFile ** aLocalFile, PRUint32 *
|
||||||
iconURI->GetContentType(aContentType);
|
iconURI->GetContentType(aContentType);
|
||||||
iconURI->GetFileExtension(aFileExtension);
|
iconURI->GetFileExtension(aFileExtension);
|
||||||
|
|
||||||
nsCOMPtr<nsIURI> fileURI;
|
nsCOMPtr<nsIURL> url;
|
||||||
rv = iconURI->GetIconFile(getter_AddRefs(fileURI));
|
rv = iconURI->GetIconURL(getter_AddRefs(url));
|
||||||
if (NS_FAILED(rv) || !fileURI) return NS_OK;
|
if (NS_FAILED(rv) || !url) return NS_OK;
|
||||||
|
|
||||||
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(fileURI, &rv);
|
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(url, &rv);
|
||||||
if (NS_FAILED(rv) || !fileURL) return NS_OK;
|
if (NS_FAILED(rv) || !fileURL) return NS_OK;
|
||||||
|
|
||||||
nsCOMPtr<nsIFile> file;
|
nsCOMPtr<nsIFile> file;
|
||||||
rv = fileURL->GetFile(getter_AddRefs(file));
|
rv = fileURL->GetFile(getter_AddRefs(file));
|
||||||
if (NS_FAILED(rv) || !file) return NS_OK;
|
if (NS_FAILED(rv) || !file) return NS_OK;
|
||||||
|
|
||||||
*aLocalFile = file;
|
*aLocalFile = file;
|
||||||
NS_IF_ADDREF(*aLocalFile);
|
NS_IF_ADDREF(*aLocalFile);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче