diff options
author | Xan Lopez <xan@gnome.org> | 2009-10-23 01:06:54 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-10-23 01:24:19 +0800 |
commit | 7a31887b89005519fcb012cce53adc2a6402d066 (patch) | |
tree | 14a1abb5f061923d407db31ef5d5209e28845b6c /src | |
parent | 7a31aae32f3638ec99f432795f5c721b60e67268 (diff) | |
download | gsoc2013-epiphany-7a31887b89005519fcb012cce53adc2a6402d066.tar.gz gsoc2013-epiphany-7a31887b89005519fcb012cce53adc2a6402d066.tar.zst gsoc2013-epiphany-7a31887b89005519fcb012cce53adc2a6402d066.zip |
Unref EphyShell on EphyWindow's dispose method
This way we can break ref cycles that can happen when using Seed extensions.
Bug #573551
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-window.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 61cc17c8c..3f53fa39d 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -458,6 +458,7 @@ struct _EphyWindowPrivate guint is_popup : 1; guint present_on_insert : 1; guint key_theme_is_emacs : 1; + guint shell_unref : 1; }; enum @@ -3314,6 +3315,15 @@ ephy_window_dispose (GObject *object) destroy_fullscreen_popup (window); G_OBJECT_CLASS (ephy_window_parent_class)->dispose (object); + + /* We need to unref the shell after chaining up to the parent + * class, since our children widgets might need the shell to + * be around for some cleanup operations */ + if (window->priv->shell_unref == FALSE) + { + g_object_unref (ephy_shell); + window->priv->shell_unref = TRUE; + } } static void @@ -3834,8 +3844,6 @@ ephy_window_finalize (GObject *object) G_OBJECT_CLASS (ephy_window_parent_class)->finalize (object); LOG ("EphyWindow finalised %p", object); - - g_object_unref (ephy_shell); } /** |