[gsignal] Fix closure invalidation
authorRyan Lortie <desrt@desrt.ca>
Mon, 8 Oct 2012 22:20:24 +0000 (18:20 -0400)
committerRyan Lortie <desrt@desrt.ca>
Tue, 9 Oct 2012 15:40:45 +0000 (11:40 -0400)
commit66b0d95f0ba1939882368b47b01f93289c42ae07
treefee754f2e7e9cb27e7328d5192f782e9d4dd5c75
parentfd29b2f356913e05d97cf372b3576bf7c32836e7
[gsignal] Fix closure invalidation

If the closure is invalidated we drop the ref on the signal handler
node, but if the signal is currently being dispatched, the ref could be
held elsewhere.

Flag that we no longer have an outstanding invalidation handler so that
we don't try to unregister ourselves when the other ref drops.

Add a testcase that catches this situation.
gobject/tests/signals.c