[gjs: 19/22] object: Improve debugging during wrapping/unwrapping GObject
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 19/22] object: Improve debugging during wrapping/unwrapping GObject
- Date: Fri, 23 Apr 2021 04:56:07 +0000 (UTC)
commit 57083717017c850a8a634d9753c20b5b3fae63cb
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Tue Apr 6 22:30:58 2021 +0200
object: Improve debugging during wrapping/unwrapping GObject
gi/object.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index b32f094f..e253b843 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1385,6 +1385,10 @@ ObjectInstance::release_native_object(void)
return;
}
+ if (m_ptr)
+ gjs_debug_lifecycle(GJS_DEBUG_GOBJECT, "Releasing native object %s %p",
+ g_type_name(gtype()), m_ptr.get());
+
if (m_gobj_disposed)
ignore_gobject_finalization();
@@ -2507,8 +2511,8 @@ ObjectInstance* ObjectInstance::new_for_gobject(JSContext* cx, GObject* gobj) {
GType gtype = G_TYPE_FROM_INSTANCE(gobj);
- gjs_debug_marshal(GJS_DEBUG_GOBJECT, "Wrapping %s with JSObject",
- g_type_name(gtype));
+ gjs_debug_marshal(GJS_DEBUG_GOBJECT, "Wrapping %s %p with JSObject",
+ g_type_name(gtype), gobj);
JS::RootedObject proto(cx, gjs_lookup_object_prototype(cx, gtype));
if (!proto)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]