seed r279 - trunk/libseed
- From: hortont svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r279 - trunk/libseed
- Date: Fri, 21 Nov 2008 18:15:45 +0000 (UTC)
Author: hortont
Date: Fri Nov 21 18:15:45 2008
New Revision: 279
URL: http://svn.gnome.org/viewvc/seed?rev=279&view=rev
Log:
Add logging for finalize handler.
Modified:
trunk/libseed/seed-engine.c
trunk/libseed/seed-signals.c
trunk/libseed/seed-types.c
Modified: trunk/libseed/seed-engine.c
==============================================================================
--- trunk/libseed/seed-engine.c (original)
+++ trunk/libseed/seed-engine.c Fri Nov 21 18:15:45 2008
@@ -527,7 +527,16 @@
gobject = seed_value_to_object((JSValueRef) object, 0);
if (!gobject)
- return;
+ {
+ SEED_NOTE(FINALIZATION,
+ "Attempting to finalize already destroyed object.");
+ return;
+ }
+
+ SEED_NOTE(FINALIZATION, "%s at %p (%d refs)",
+ g_type_name(G_OBJECT_TYPE(gobject)),
+ gobject,
+ gobject->ref_count);
g_object_set_data_full (gobject, "js-ref", NULL, NULL);
@@ -542,17 +551,16 @@
gobject = seed_value_to_object((JSValueRef) object, 0);
if (!gobject)
- return;
+ return;
base = g_irepository_find_by_gtype(g_irepository_get_default(),
G_OBJECT_TYPE(gobject));
seed_add_signals_to_object(object, gobject);
if (!base)
- return;
+ return;
g_assert(g_base_info_get_type(base) == GI_INFO_TYPE_OBJECT);
-
}
static JSValueRef
Modified: trunk/libseed/seed-signals.c
==============================================================================
--- trunk/libseed/seed-signals.c (original)
+++ trunk/libseed/seed-signals.c Fri Nov 21 18:15:45 2008
@@ -136,10 +136,10 @@
}
if (seed_closure->user_data)
- args[i] = seed_closure->user_data;
+ args[i] = seed_closure->user_data;
else
- args[i] = JSValueMakeNull(eng->context);
-
+ args[i] = JSValueMakeNull(eng->context);
+
ret = JSObjectCallAsFunction(eng->context, seed_closure->function,
seed_closure->this,
n_param_values + 1, args, &exception);
Modified: trunk/libseed/seed-types.c
==============================================================================
--- trunk/libseed/seed-types.c (original)
+++ trunk/libseed/seed-types.c Fri Nov 21 18:15:45 2008
@@ -52,7 +52,6 @@
{
JSValueProtect(eng->context, wrapper);
}
-
}
static void seed_gobject_destroyed(gpointer object)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]