[seed] libseed: do not call JSValueProtect on values the GC might have freed



commit 8bccd48bafbef62671e4a1dcbe8a18e604f76370
Author: Iain Nicol <iain thenicols net>
Date:   Mon Nov 2 03:59:35 2009 +0000

    libseed: do not call JSValueProtect on values the GC might have freed
    
    Closes BGO #599666

 libseed/seed-types.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index 689e4cc..77b709a 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -41,6 +41,9 @@ seed_toggle_ref (gpointer data, GObject * object, gboolean is_last_ref)
 {
   JSValueRef wrapper;
 
+  if (!g_object_get_data (object, "js-ref"))
+    return;
+
   wrapper = (JSValueRef) data;
 
   if (is_last_ref)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]