diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 21:00:39 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-22 21:00:39 +0200 |
commit | 8af1b0c22a9c449746479b8a82494e43d60af573 (patch) | |
tree | 4c806a622e08a97a2269441780ab14e9f64248c1 /dom/base | |
parent | 95c46082414632687e3ddd52435d476ab9dc320f (diff) | |
download | UXP-8af1b0c22a9c449746479b8a82494e43d60af573.tar UXP-8af1b0c22a9c449746479b8a82494e43d60af573.tar.gz UXP-8af1b0c22a9c449746479b8a82494e43d60af573.tar.lz UXP-8af1b0c22a9c449746479b8a82494e43d60af573.tar.xz UXP-8af1b0c22a9c449746479b8a82494e43d60af573.zip |
Bug 1329570 - Restore missing error check in mozilla::dom::Location::GetPathname
native in moebius
Diffstat (limited to 'dom/base')
-rw-r--r-- | dom/base/Location.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dom/base/Location.cpp b/dom/base/Location.cpp index e3b614931..b17e733d5 100644 --- a/dom/base/Location.cpp +++ b/dom/base/Location.cpp @@ -577,9 +577,10 @@ Location::GetPathname(nsAString& aPathname) aPathname.Truncate(); nsCOMPtr<nsIURI> uri; - nsresult result = NS_OK; - - result = GetURI(getter_AddRefs(uri)); + nsresult result = GetURI(getter_AddRefs(uri)); + if (NS_FAILED(result) || !uri) { + return result; + } nsCOMPtr<nsIURIWithQuery> url(do_QueryInterface(uri)); if (url) { |