Bug 1323683 - Fold nsIURIWithQuery into nsIURI

native in moebius
This commit is contained in:
janekptacijarabaci 2018-04-22 21:20:53 +02:00 committed by Roy Tam
commit 8dccc387f9
14 changed files with 110 additions and 107 deletions

View file

@ -582,15 +582,12 @@ Location::GetPathname(nsAString& aPathname)
return result;
}
nsCOMPtr<nsIURIWithQuery> url(do_QueryInterface(uri));
if (url) {
nsAutoCString file;
nsAutoCString file;
result = url->GetFilePath(file);
result = uri->GetFilePath(file);
if (NS_SUCCEEDED(result)) {
AppendUTF8toUTF16(file, aPathname);
}
if (NS_SUCCEEDED(result)) {
AppendUTF8toUTF16(file, aPathname);
}
return result;
@ -605,8 +602,7 @@ Location::SetPathname(const nsAString& aPathname)
return rv;
}
nsCOMPtr<nsIURIWithQuery> url(do_QueryInterface(uri));
if (url && NS_SUCCEEDED(url->SetFilePath(NS_ConvertUTF16toUTF8(aPathname)))) {
if (NS_SUCCEEDED(uri->SetFilePath(NS_ConvertUTF16toUTF8(aPathname)))) {
return SetURI(uri);
}