Bug 625584 – Crashes application on unref with signal subscription
authorDavid Zeuthen <davidz@redhat.com>
Fri, 30 Jul 2010 20:01:03 +0000 (16:01 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Fri, 30 Jul 2010 20:06:18 +0000 (16:06 -0400)
commitd2d97a214d1d9e96f09955212e669c3c9447ff73
treedf031605bdc30470298ae9308614bd5eb6da75b5
parent1b5b87bfa0f5435dd6e973a4e36076db083dc5c7
Bug 625584 – Crashes application on unref with signal subscription

Don't do too much work in the finalizer - in particular, there's no
need to send RemoveMatch() messages to the bus daemon since we're
going to sever the connection and the bus will garbage collect
anyway. In this case it crashed the process.

Also add a test case that checks that the appropriate GDestroyNotify
callbacks are called when unreffing a connection with either 1)
exported objects; 2) signal subscriptions or 3) filter functions
.. yes, ideally apps would unregister such callbacks before giving up
their ref but that's not how things work :-)

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusconnection.c
gio/tests/gdbus-connection.c