gjs r107 - trunk/gi



Author: hp
Date: Wed Nov 19 16:25:49 2008
New Revision: 107
URL: http://svn.gnome.org/viewvc/gjs?rev=107&view=rev

Log:
fix bug #561528 that passing an integer into an array parameter would crash due to missing JSVAL_IS_OBJECT()


Modified:
   trunk/gi/arg.c

Modified: trunk/gi/arg.c
==============================================================================
--- trunk/gi/arg.c	(original)
+++ trunk/gi/arg.c	Wed Nov 19 16:25:49 2008
@@ -560,6 +560,9 @@
     case GI_TYPE_TAG_ARRAY:
         if (JSVAL_IS_NULL(value)) {
             arg->v_pointer = NULL;
+        } else if (!JSVAL_IS_OBJECT(value)) {
+            wrong = TRUE;
+            report_type_mismatch = TRUE;
         } else if (gjs_object_has_property(context,
                                            JSVAL_TO_OBJECT(value),
                                            "length")) {



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