aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/EphyAboutRedirector.cpp22
-rw-r--r--embed/mozilla/EphyAboutRedirector.h1
2 files changed, 14 insertions, 9 deletions
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"