[seed] fix binding GStrv to javascript value
- From: Alan Knowles <alank src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed] fix binding GStrv to javascript value
- Date: Wed, 6 Feb 2013 07:31:06 +0000 (UTC)
commit e9781ebb4c29636b5373500a2e4443e96b12dc2a
Author: Alban Crequy <alban crequy collabora co uk>
Date: Wed Feb 6 15:30:39 2013 +0800
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
libseed/seed-types.c | 2 +-
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]