aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/MozDownload.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-01-10 19:19:52 +0800
committerChristian Persch <chpe@src.gnome.org>2004-01-10 19:19:52 +0800
commit137a5961bbd03f74a90927ae1a03ed5e19e5d666 (patch)
tree710be6153d725c44fa97993e3dee32aaf74ef9d6 /embed/mozilla/MozDownload.cpp
parent264834c946c5555c48b1fda985c6513c23773228 (diff)
downloadgsoc2013-epiphany-137a5961bbd03f74a90927ae1a03ed5e19e5d666.tar
gsoc2013-epiphany-137a5961bbd03f74a90927ae1a03ed5e19e5d666.tar.gz
gsoc2013-epiphany-137a5961bbd03f74a90927ae1a03ed5e19e5d666.tar.bz2
gsoc2013-epiphany-137a5961bbd03f74a90927ae1a03ed5e19e5d666.tar.lz
gsoc2013-epiphany-137a5961bbd03f74a90927ae1a03ed5e19e5d666.tar.xz
gsoc2013-epiphany-137a5961bbd03f74a90927ae1a03ed5e19e5d666.tar.zst
gsoc2013-epiphany-137a5961bbd03f74a90927ae1a03ed5e19e5d666.zip
Use NS_ENSURE_SUCCESS/NS_ENSURE_TRUE at appropriate places.
2004-01-10 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/FilePicker.cpp: * embed/mozilla/MozDownload.cpp: * embed/mozilla/MozRegisterComponents.cpp: * embed/mozilla/MozillaPrivate.cpp: Use NS_ENSURE_SUCCESS/NS_ENSURE_TRUE at appropriate places.
Diffstat (limited to 'embed/mozilla/MozDownload.cpp')
-rw-r--r--embed/mozilla/MozDownload.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index efe13ab88..31847a3e1 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -41,6 +41,10 @@
* $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "MozDownload.h"
#include "mozilla-download.h"
#include "eel-gconf-extensions.h"
@@ -409,7 +413,7 @@ nsresult InitiateMozillaDownload (nsIDOMDocument *domDocument, nsIURI *sourceURI
strcmp (contentType, "application/xhtml+xml") == 0));
nsCOMPtr<nsIWebBrowserPersist> webPersist = do_CreateInstance(persistContractID, &rv);
- if (NS_FAILED(rv)) return rv;
+ NS_ENSURE_SUCCESS (rv, rv);
PRInt64 timeNow = PR_Now();
@@ -420,7 +424,7 @@ nsresult InitiateMozillaDownload (nsIDOMDocument *domDocument, nsIURI *sourceURI
/* dlListener attaches to its progress dialog here, which gains ownership */
rv = downloader->InitForEmbed (inOriginalURI, inDestFile, fileDisplayName.get(),
nsnull, timeNow, webPersist, embedPersist);
- if (NS_FAILED(rv)) return rv;
+ NS_ENSURE_SUCCESS (rv, rv);
PRInt32 flags = nsIWebBrowserPersist::PERSIST_FLAGS_REPLACE_EXISTING_FILES;
if (ephy_flags & EMBED_PERSIST_COPY_PAGE)