[xpcom] Fix dict keys to be UTF-16
authorKalle Vahlman <kalle.vahlman@movial.com>
Thu, 16 Apr 2009 09:01:55 +0000 (12:01 +0300)
committerKalle Vahlman <kalle.vahlman@movial.com>
Thu, 16 Apr 2009 09:01:55 +0000 (12:01 +0300)
xpcom-dbusservice/DBusMarshaling.cpp

index cfb66453a837333ca693323cbea3008269d21791..84b35a4f751c782dc000f7f4eb1ffe0cd1cb5ced 100644 (file)
@@ -1073,7 +1073,8 @@ already_AddRefed<nsIWritableVariant> getVariantFromIter(JSContext* cx, DBusMessa
                     BDBLOG(("    found value type %c\n", value_type));
                     jsval v;
                     getJSValueFromIter(cx, &dict_iter, value_type, &v);
-                    JS_SetProperty(cx, obj, key, &v);
+                    nsAutoString ukey = NS_ConvertUTF8toUTF16(key);
+                    JS_SetUCProperty(cx, obj, ukey.get(), ukey.Length(), &v);
                     
                 } while (dbus_message_iter_next(&array_iter));