[gdm/gnome-3-10] display: don't ref display when setting up slave bus watch
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/gnome-3-10] display: don't ref display when setting up slave bus watch
- Date: Wed, 28 May 2014 19:58:26 +0000 (UTC)
commit 0991e1af10ccfa65839cce0a3ccb83f1a75e46a3
Author: Ray Strode <rstrode redhat com>
Date: Wed May 28 15:52:51 2014 -0400
display: don't ref display when setting up slave bus watch
The bus watch is tied to the lifetime of the display, not the
other way around. The ref forces the display to stay alive even
after it's removed from the display store, which is wrong.
This commit removes the ref call which is unnecessary and harmful.
relevant irc discussion from #gdm
<fcrozat> but with KillMode=process, Xorg isn't killed at all
* fcrozat debugs further
...
<halfline> okay good to know
<halfline> so systemd isn't forcing it out
<halfline> but GDM isn't doing what it's supposed to either
...
<halfline> (gdb) print *((StoredDisplay *) g_hash_table_get_values
(manager->priv->display_store->priv->displays)->data)->display
<fcrozat> ref_count = 2
<halfline> right so a ref count of 2 explains why it's not going away i guess
<halfline> ahh
<halfline> g_bus_watch_name_on_connection takes a ref
<halfline> fcrozat: that g_object_ref (display) in set_slave_bus_name is completely unneeded
<halfline> and what's causing the issue
...
<fcrozat> let's try
<fcrozat> and it works !
daemon/gdm-display.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index b1adae8..0faf043 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -306,7 +306,7 @@ gdm_display_real_set_slave_bus_name (GdmDisplay *display,
G_BUS_NAME_WATCHER_FLAGS_NONE,
NULL, /* name appeared */
on_name_vanished,
- g_object_ref (display),
+ display,
NULL);
g_clear_object (&display->priv->slave_bus_proxy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]