diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 21:20:53 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 21:20:53 +0200 |
commit | dbfad99a51062e663da19266219191c0dc3521be (patch) | |
tree | 7d6b34d98372e37efc57e40c827572779eb64ba2 /dom/base/Location.cpp | |
parent | 8af1b0c22a9c449746479b8a82494e43d60af573 (diff) | |
download | UXP-dbfad99a51062e663da19266219191c0dc3521be.tar UXP-dbfad99a51062e663da19266219191c0dc3521be.tar.gz UXP-dbfad99a51062e663da19266219191c0dc3521be.tar.lz UXP-dbfad99a51062e663da19266219191c0dc3521be.tar.xz UXP-dbfad99a51062e663da19266219191c0dc3521be.zip |
Bug 1323683 - Fold nsIURIWithQuery into nsIURI
native in moebius
Diffstat (limited to 'dom/base/Location.cpp')
-rw-r--r-- | dom/base/Location.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/dom/base/Location.cpp b/dom/base/Location.cpp index b17e733d5..b6b95aaa6 100644 --- a/dom/base/Location.cpp +++ b/dom/base/Location.cpp @@ -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); } |