seed r189 - trunk/libseed



Author: racarr
Date: Sat Nov  8 03:39:38 2008
New Revision: 189
URL: http://svn.gnome.org/viewvc/seed?rev=189&view=rev

Log:
Always pass user_data, even if null, so that functions expecting but not receiving user_data will not crash javascript core.


Modified:
   trunk/libseed/seed-signals.c

Modified: trunk/libseed/seed-signals.c
==============================================================================
--- trunk/libseed/seed-signals.c	(original)
+++ trunk/libseed/seed-signals.c	Sat Nov  8 03:39:38 2008
@@ -127,7 +127,10 @@
 
     }
 
-    args[i] = seed_closure->user_data;
+    if (seed_closure->user_data)
+      args[i] = seed_closure->user_data;
+    else
+      args[i] = JSValueMakeNull(eng->context);
 
     JSObjectCallAsFunction(eng->context, seed_closure->function,
 			   seed_closure->this, n_param_values+1, args, 0);



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