aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--embed/mozilla/EphyAboutRedirector.cpp22
-rw-r--r--embed/mozilla/EphyAboutRedirector.h1
3 files changed, 27 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index a19bef19f..a9d46c51c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-01-10 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/EphyAboutRedirector.cpp:
+ * embed/mozilla/EphyAboutRedirector.h:
+
+ Use NS_ENSURE_SUCCESS/NS_ENSURE_TRUE at appropriate places instead of
+ silent "if (...) return ...;".
+ Really kill "about:options".
+
2004-01-10 Xan Lopez <xan@gnome.org>
* data/ui/epiphany-ui.xml:
@@ -54,7 +63,11 @@
* lib/ephy-state.c: Fixed a logic error in using & instead of &&
(bug #130919, Dave Jones).
+<<<<<<< ChangeLog
+2004-01-08 Chris Lahey <clahey@ximian.com>
+=======
2004-01-08 Christopher James Lahey <clahey@ximian.com>
+>>>>>>> 1.1255
* embed/mozilla/ContentHandler.cpp (MIMEAskAction): Don't save the
file if disable_save_to_disk is on.
diff --git a/embed/mozilla/EphyAboutRedirector.cpp b/embed/mozilla/EphyAboutRedirector.cpp
index 7a240d92b..6d1e9d479 100644
--- a/embed/mozilla/EphyAboutRedirector.cpp
+++ b/embed/mozilla/EphyAboutRedirector.cpp
@@ -36,6 +36,10 @@
*
* ***** END LICENSE BLOCK ***** */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "EphyAboutRedirector.h"
#include "nsNetCID.h"
#include "nsIIOService.h"
@@ -68,23 +72,26 @@ EphyAboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result)
NS_ENSURE_ARG(aURI);
nsCAutoString path;
(void)aURI->GetPath(path);
- nsresult rv;
- nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID, &rv));
- if (NS_FAILED(rv))
- return rv;
+
+ nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID));
+ NS_ENSURE_TRUE (ioService, NS_ERROR_FAILURE);
for (int i = 0; i< kRedirTotal; i++)
{
if (!PL_strcasecmp(path.get(), kRedirMap[i].id))
{
nsCOMPtr<nsIChannel> tempChannel;
- rv = ioService->NewChannel(nsDependentCString(kRedirMap[i].url),
- nsnull, nsnull, getter_AddRefs(tempChannel));
+ ioService->NewChannel(nsDependentCString(kRedirMap[i].url),
+ nsnull, nsnull, getter_AddRefs(tempChannel));
+ NS_ENSURE_TRUE (tempChannel, NS_ERROR_FAILURE);
+
*result = tempChannel.get();
NS_ADDREF(*result);
- return rv;
+
+ return NS_OK;
}
}
+
NS_ASSERTION(0, "EphyAboutRedirector called for unknown case");
return NS_ERROR_ILLEGAL_VALUE;
}
@@ -100,4 +107,3 @@ EphyAboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
NS_RELEASE(about);
return rv;
}
-
diff --git a/embed/mozilla/EphyAboutRedirector.h b/embed/mozilla/EphyAboutRedirector.h
index 4ac63be78..70421f089 100644
--- a/embed/mozilla/EphyAboutRedirector.h
+++ b/embed/mozilla/EphyAboutRedirector.h
@@ -64,7 +64,6 @@ protected:
{0xbf, 0xd0, 0x52, 0xf6, 0x94, 0x45, 0xaf, 0xb7} \
}
-#define EPHY_ABOUT_REDIRECTOR_OPTIONS_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "options"
#define EPHY_ABOUT_REDIRECTOR_EPIPHANY_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "epiphany"
#define EPHY_ABOUT_REDIRECTOR_CONSPIRACY_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "conspiracy"
#define EPHY_ABOUT_REDIRECTOR_MARCO_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "marco"