aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-09-30 21:12:29 +0800
committerChristian Persch <chpe@src.gnome.org>2005-09-30 21:12:29 +0800
commit337111c6344cc95028968f138b43fd6065be576d (patch)
tree3416be969db208783a6fc99420050442736ff7dd
parent473a9c17b8d50b3cff07c3ab26f39a60ff64aeac (diff)
downloadgsoc2013-epiphany-337111c6344cc95028968f138b43fd6065be576d.tar
gsoc2013-epiphany-337111c6344cc95028968f138b43fd6065be576d.tar.gz
gsoc2013-epiphany-337111c6344cc95028968f138b43fd6065be576d.tar.bz2
gsoc2013-epiphany-337111c6344cc95028968f138b43fd6065be576d.tar.lz
gsoc2013-epiphany-337111c6344cc95028968f138b43fd6065be576d.tar.xz
gsoc2013-epiphany-337111c6344cc95028968f138b43fd6065be576d.tar.zst
gsoc2013-epiphany-337111c6344cc95028968f138b43fd6065be576d.zip
Return error on failure.
2005-09-26 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyAboutModule.cpp: Return error on failure.
-rw-r--r--ChangeLog6
-rw-r--r--embed/mozilla/EphyAboutModule.cpp13
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index f4eac6137..02c073df5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-26 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/EphyAboutModule.cpp:
+
+ Return error on failure.
+
2005-09-28 Christian Persch <chpe@cvs.gnome.org>
* src/window-commands.c: (window_cmd_file_bookmark_page):
diff --git a/embed/mozilla/EphyAboutModule.cpp b/embed/mozilla/EphyAboutModule.cpp
index 5b38b0ae1..af18c5e9a 100644
--- a/embed/mozilla/EphyAboutModule.cpp
+++ b/embed/mozilla/EphyAboutModule.cpp
@@ -71,7 +71,7 @@ EphyAboutModule::NewChannel(nsIURI *aURI,
nsCAutoString path;
aURI->GetPath (path);
- if (strncmp (path.get(), "neterror", strlen ("neterror")) == 0)
+ if (strncmp (path.get(), "neterror?", strlen ("neterror?")) == 0)
{
return CreateErrorPage (aURI, _retval);
}
@@ -163,7 +163,7 @@ EphyAboutModule::ParseErrorURL(const char *aURL,
}
g_strfreev (params);
-
+
return NS_OK;
}
@@ -342,16 +342,17 @@ EphyAboutModule::CreateErrorPage(nsIURI *aErrorURI,
nsresult rv = NS_ERROR_ILLEGAL_VALUE;
nsCAutoString spec;
rv = aErrorURI->GetSpec (spec);
- NS_ENSURE_TRUE (NS_SUCCEEDED (rv) && !spec.IsEmpty(), rv);
+ NS_ENSURE_TRUE (NS_SUCCEEDED (rv), rv);
nsCAutoString error, rawurl, url, charset;
rv = ParseErrorURL (spec.get (), error, rawurl, url, charset);
- if (NS_FAILED (rv) || error.IsEmpty () || url.IsEmpty()) return rv;
+ if (NS_FAILED (rv)) return rv;
+ if (error.IsEmpty () || rawurl.IsEmpty () || url.IsEmpty()) return NS_ERROR_FAILURE;
nsCOMPtr<nsIURI> uri;
rv = EphyUtils::NewURI(getter_AddRefs (uri), url, charset.get());
/* FIXME can uri be NULL if the original url was invalid? */
- NS_ENSURE_TRUE (NS_SUCCEEDED (rv) && uri, rv);
+ NS_ENSURE_TRUE (NS_SUCCEEDED (rv), rv);
char *primary = nsnull, *secondary = nsnull, *tertiary = nsnull, *linkintro = nsnull;
rv = GetErrorMessage (uri, error.get(), &primary, &secondary, &tertiary, &linkintro);
@@ -371,7 +372,7 @@ EphyAboutModule::CreateErrorPage(nsIURI *aErrorURI,
return Redirect (url, _retval);
}
-
+ NS_ENSURE_SUCCESS (rv, rv);
NS_ENSURE_TRUE (primary && secondary, NS_ERROR_FAILURE);
/* open the rendering stream */