for (int p = 0; p < props->length; p++)
{
jsval propname;
- nsCAutoString tmpsig;
JS_IdToValue(cx, props->vector[p], &propname);
// Start the dict container
NULL, &dictIter);
JSString *prop_string = JS_ValueToString(cx, propname);
- const char *cstr = NS_ConvertUTF16toUTF8(JS_GetStringChars(prop_string),
- JS_GetStringLength(prop_string)).get();
+ nsCAutoString u8str = NS_ConvertUTF16toUTF8(JS_GetStringChars(prop_string),
+ JS_GetStringLength(prop_string));
+ const char *cstr = u8str.get();
// TODO: we only use strings as keys currently, although
// the spec allows any basic type to be a key and we
// probably *could* use the property index.