aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-07-21 06:28:55 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-07-21 06:28:55 +0800
commit750efa7d51d97859f37e9e59065ba176d7520cce (patch)
treeef473016ddcad25326d02e14a88bab3b93a29958 /embed/mozilla/mozilla-embed-single.cpp
parent0e8132c237b8da5837ea2f8889507d91b0ead33c (diff)
downloadgsoc2013-epiphany-750efa7d51d97859f37e9e59065ba176d7520cce.tar
gsoc2013-epiphany-750efa7d51d97859f37e9e59065ba176d7520cce.tar.gz
gsoc2013-epiphany-750efa7d51d97859f37e9e59065ba176d7520cce.tar.bz2
gsoc2013-epiphany-750efa7d51d97859f37e9e59065ba176d7520cce.tar.lz
gsoc2013-epiphany-750efa7d51d97859f37e9e59065ba176d7520cce.tar.xz
gsoc2013-epiphany-750efa7d51d97859f37e9e59065ba176d7520cce.tar.zst
gsoc2013-epiphany-750efa7d51d97859f37e9e59065ba176d7520cce.zip
No need to use a weak ref for the observer, makes the single code easier.
2004-07-21 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/EphySingle.cpp: * embed/mozilla/EphySingle.h: * embed/mozilla/mozilla-embed-single.cpp: No need to use a weak ref for the observer, makes the single code easier.
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 0ee08f9d4..fb6f644e3 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -419,8 +419,7 @@ mozilla_init_observer (MozillaEmbedSingle *single)
EphySingle *es;
es = new EphySingle ();
- nsCOMPtr<nsIObserver> guard = NS_STATIC_CAST (nsIObserver *, es);
- if (!guard) return;
+ NS_ADDREF (single->priv->mSingleObserver = es);
nsresult rv;
rv = es->Init (EPHY_EMBED_SINGLE (single));
@@ -429,8 +428,6 @@ mozilla_init_observer (MozillaEmbedSingle *single)
g_warning ("Failed to initialise EphySingle!\n");
return;
}
-
- NS_ADDREF (single->priv->mSingleObserver = es);
}
static gboolean
@@ -511,8 +508,6 @@ mozilla_embed_single_dispose (GObject *object)
{
single->priv->mSingleObserver->Detach ();
NS_RELEASE (single->priv->mSingleObserver);
- delete single->priv->mSingleObserver;
- single->priv->mSingleObserver = nsnull;
}
}