summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Crequy <alban.crequy@collabora.co.uk>2013-02-06 07:30:39 (GMT)
committerAlan Knowles <alan@roojs.com>2013-02-06 07:30:39 (GMT)
commite9781ebb4c29636b5373500a2e4443e96b12dc2a (patch)
tree13867b6513d71a0feb71225c4053cf6f6588d711
parent9f1c31e475e5b782edca239023eaf0d64ddc37fc (diff)
downloadseed-e9781ebb4c29636b5373500a2e4443e96b12dc2a.tar.gz
seed-e9781ebb4c29636b5373500a2e4443e96b12dc2a.tar.xz
fix binding GStrv to javascript value
libseed crashes when converting a GStrv to a javascript value. It happens when the javascript code connects to the "g-properties-changed" GLib signal on GDBusProxy objects. https://bugzilla.gnome.org/show_bug.cgi?id=693217
-rw-r--r--libseed/seed-types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index 8f556e6..c19ae6a 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -2598,7 +2598,7 @@ seed_value_from_strv (JSContextRef ctx,
GArray *js_string_array = g_array_new (FALSE, FALSE, sizeof(gpointer));
for (; *val != NULL; val++)
{
- JSStringRef js_string = JSStringCreateWithUTF8CString((char*)*val);
+ JSStringRef js_string = seed_value_from_string (ctx, *val, exception);
js_string_array = g_array_append_val(js_string_array, js_string);
}
JSValueRef res = JSObjectMakeArray (ctx,