summaryrefslogtreecommitdiff
path: root/gobject
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2022-12-06 04:43:02 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2022-12-06 04:43:02 +0100
commit6cd6cc41bbb3c35be33972e501cdb56282faec25 (patch)
treec601a6c6da94a673cb0d6a8c9c96776f057211f3 /gobject
parent0918ce013af0b7d5ac1621fbbbb3dd114f1b7c64 (diff)
downloadglib-6cd6cc41bbb3c35be33972e501cdb56282faec25.tar.gz
gobject: Trace unref just after this happened
Trace the unref before potentially calling (user) code that may re-ref or unref again, causing the tracing order to be messed up.
Diffstat (limited to 'gobject')
-rw-r--r--gobject/gobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gobject/gobject.c b/gobject/gobject.c
index da799888d..ee2cea865 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -3885,11 +3885,11 @@ g_object_unref (gpointer _object)
&old_ref))
continue;
+ TRACE (GOBJECT_OBJECT_UNREF (object, G_TYPE_FROM_INSTANCE (object), old_ref));
+
/* emit all notifications that have been queued during dispose() */
g_object_notify_queue_thaw (object, nqueue);
- TRACE (GOBJECT_OBJECT_UNREF(object,G_TYPE_FROM_INSTANCE(object),old_ref));
-
/* if we went from 2->1 we need to notify toggle refs if any */
if (old_ref == 2 && OBJECT_HAS_TOGGLE_REF (object) &&
g_atomic_int_get ((int *)&object->ref_count) == 1)