aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/MozDownload.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-03-04 03:06:24 +0800
committerChristian Persch <chpe@src.gnome.org>2004-03-04 03:06:24 +0800
commitade55d6a9658567dcefb18fc0d536a7e3eed0c8c (patch)
tree02f3c16b703458b4e20446339f45f5e3061c2913 /embed/mozilla/MozDownload.cpp
parentb96b5b6cf8faac19449cf6800f72ce1e610a69ea (diff)
downloadgsoc2013-epiphany-ade55d6a9658567dcefb18fc0d536a7e3eed0c8c.tar
gsoc2013-epiphany-ade55d6a9658567dcefb18fc0d536a7e3eed0c8c.tar.gz
gsoc2013-epiphany-ade55d6a9658567dcefb18fc0d536a7e3eed0c8c.tar.bz2
gsoc2013-epiphany-ade55d6a9658567dcefb18fc0d536a7e3eed0c8c.tar.lz
gsoc2013-epiphany-ade55d6a9658567dcefb18fc0d536a7e3eed0c8c.tar.xz
gsoc2013-epiphany-ade55d6a9658567dcefb18fc0d536a7e3eed0c8c.tar.zst
gsoc2013-epiphany-ade55d6a9658567dcefb18fc0d536a7e3eed0c8c.zip
Unset the GValue after we're done using what it contained.
2004-03-03 Christian Persch <chpe@cvs.gnome.org> * embed/downloader-view.c: (download_dialog_pause_cb), (download_dialog_abort_cb): Unset the GValue after we're done using what it contained. * embed/mozilla/MozDownload.cpp: Weak ref mEphyDownload, and assert that is has been finalised by the time we get to ~MozDownload. * embed/mozilla/mozilla-download.cpp: Debug output in _init and _finalize.
Diffstat (limited to 'embed/mozilla/MozDownload.cpp')
-rw-r--r--embed/mozilla/MozDownload.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index f2877ce9b..f65ed2bd2 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -76,6 +76,8 @@ MozDownload::MozDownload() :
MozDownload::~MozDownload()
{
LOG ("MozDownload dtor (%p)", (void *) this)
+
+ NS_ASSERTION (!mEphyDownload, "MozillaDownload still alive!");
}
NS_IMPL_ISUPPORTS2(MozDownload, nsIDownload, nsIWebProgressListener)
@@ -129,6 +131,8 @@ MozDownload::Init(nsIURI *aSource, nsILocalFile *aTarget, const PRUnichar *aDisp
dview = EPHY_DOWNLOADER_VIEW
(ephy_embed_shell_get_downloader_view (embed_shell));
mEphyDownload = mozilla_download_new (this);
+ g_object_add_weak_pointer (G_OBJECT (mEphyDownload),
+ (gpointer *) &mEphyDownload);
downloader_view_add_download (dview, mEphyDownload);
g_object_unref (mEphyDownload);
}