aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphySingle.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-09-07 04:08:18 +0800
committerChristian Persch <chpe@src.gnome.org>2006-09-07 04:08:18 +0800
commit60861941d740b92a1eab06f45cfa3db337a537e2 (patch)
treebe6299645c1f96ddd99be9eb0bba8457f65d0550 /embed/mozilla/EphySingle.cpp
parent3f939976388408a4e5887f431d6c7dbd034d57d6 (diff)
downloadgsoc2013-epiphany-60861941d740b92a1eab06f45cfa3db337a537e2.tar
gsoc2013-epiphany-60861941d740b92a1eab06f45cfa3db337a537e2.tar.gz
gsoc2013-epiphany-60861941d740b92a1eab06f45cfa3db337a537e2.tar.bz2
gsoc2013-epiphany-60861941d740b92a1eab06f45cfa3db337a537e2.tar.lz
gsoc2013-epiphany-60861941d740b92a1eab06f45cfa3db337a537e2.tar.xz
gsoc2013-epiphany-60861941d740b92a1eab06f45cfa3db337a537e2.tar.zst
gsoc2013-epiphany-60861941d740b92a1eab06f45cfa3db337a537e2.zip
Remove some unnecessary static data.
2006-09-06 Christian Persch <chpe@cvs.gnome.org> * *.c *.cpp: Remove some unnecessary static data.
Diffstat (limited to 'embed/mozilla/EphySingle.cpp')
-rw-r--r--embed/mozilla/EphySingle.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/embed/mozilla/EphySingle.cpp b/embed/mozilla/EphySingle.cpp
index ec8eb0b84..d3a78bca9 100644
--- a/embed/mozilla/EphySingle.cpp
+++ b/embed/mozilla/EphySingle.cpp
@@ -148,20 +148,20 @@ EphySingle::EmitPermissionNotification (const char *name,
nsresult
EphySingle::ExamineCookies (nsISupports *aSubject)
{
- nsCOMPtr<nsIPropertyBag2> props = do_QueryInterface(aSubject);
- NS_ENSURE_TRUE (props, NS_ERROR_FAILURE);
-
PRBool isBlockingCookiesChannel = PR_FALSE;
- props->GetPropertyAsBool(
- NS_LITERAL_STRING("epiphany-blocking-cookies"),
- &isBlockingCookiesChannel);
- if (isBlockingCookiesChannel)
+
+ nsCOMPtr<nsIPropertyBag2> props (do_QueryInterface(aSubject));
+ if (props &&
+ NS_SUCCEEDED (props->GetPropertyAsBool(
+ NS_LITERAL_STRING("epiphany-blocking-cookies"),
+ &isBlockingCookiesChannel)) &&
+ isBlockingCookiesChannel)
{
- nsCOMPtr<nsIHttpChannel> channel = do_QueryInterface(aSubject);
- NS_ENSURE_TRUE (channel, NS_ERROR_FAILURE);
+ nsCOMPtr<nsIHttpChannel> httpChannel (do_QueryInterface(aSubject));
- channel->SetRequestHeader(NS_LITERAL_CSTRING("Cookie"),
- EmptyCString(), PR_FALSE);
+ if (httpChannel)
+ httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Cookie"),
+ EmptyCString(), PR_FALSE);
}
return NS_OK;