aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-extensions-manager.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-06-11 05:21:36 +0800
committerChristian Persch <chpe@src.gnome.org>2005-06-11 05:21:36 +0800
commit55bcddfd18577f6363842ad3b1772e0db9f1c011 (patch)
tree8d9902be38c7d2b19072106bac9a5f840acd2660 /src/ephy-extensions-manager.c
parent525eb97bca09bc9a4abe3925f70c3fc5a485f3f7 (diff)
downloadgsoc2013-epiphany-55bcddfd18577f6363842ad3b1772e0db9f1c011.tar
gsoc2013-epiphany-55bcddfd18577f6363842ad3b1772e0db9f1c011.tar.gz
gsoc2013-epiphany-55bcddfd18577f6363842ad3b1772e0db9f1c011.tar.bz2
gsoc2013-epiphany-55bcddfd18577f6363842ad3b1772e0db9f1c011.tar.lz
gsoc2013-epiphany-55bcddfd18577f6363842ad3b1772e0db9f1c011.tar.xz
gsoc2013-epiphany-55bcddfd18577f6363842ad3b1772e0db9f1c011.tar.zst
gsoc2013-epiphany-55bcddfd18577f6363842ad3b1772e0db9f1c011.zip
Common helper function to unref a GObject from idle.
2005-06-10 Christian Persch <chpe@cvs.gnome.org> * lib/Makefile.am: * lib/ephy-object-helpers.c: * lib/ephy-object-helpers.h: Common helper function to unref a GObject from idle. * embed/downloader-view.c: (downloader_view_finalize): * embed/mozilla/mozilla-embed-find.cpp: * embed/mozilla/mozilla-embed-persist.cpp: * embed/mozilla/mozilla-embed.cpp: * src/ephy-extensions-manager.c: (unload_extension): * src/ephy-main.c: (main): * src/ephy-shell.c: (toolwindow_hide_cb): * src/ephy-window.c: (ephy_window_finalize): Always unref the shell from idle, never directly. That's because in case we hold the last reference, we would end up terminating embedding/XPCOM from a mozilla callback. Fixes bug #151037, and moz#236688.
Diffstat (limited to 'src/ephy-extensions-manager.c')
-rw-r--r--src/ephy-extensions-manager.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/ephy-extensions-manager.c b/src/ephy-extensions-manager.c
index 055178a56..a140ad34d 100644
--- a/src/ephy-extensions-manager.c
+++ b/src/ephy-extensions-manager.c
@@ -31,6 +31,7 @@
#include "ephy-shell.h"
#include "eel-gconf-extensions.h"
#include "ephy-file-helpers.h"
+#include "ephy-object-helpers.h"
#include "ephy-debug.h"
#include <libxml/tree.h>
@@ -891,14 +892,6 @@ detach_window (EphyWindow *window,
ephy_extension_detach_window (extension, window);
}
-static gboolean
-idle_unref (GObject *object)
-{
- g_object_unref (object);
-
- return FALSE;
-}
-
static void
unload_extension (EphyExtensionsManager *manager,
ExtensionInfo *info)
@@ -925,7 +918,7 @@ unload_extension (EphyExtensionsManager *manager,
* extension has its own functions queued in the idle loop, the
* functions must exist in memory before being called.
*/
- g_idle_add ((GSourceFunc) idle_unref, info->extension);
+ ephy_object_idle_unref (info->extension);
}
ephy_loader_release_object (info->loader, G_OBJECT (info->extension));