Bug 1034689 part 2 - Add AssignJSFlatString and use it. r=bz,terrence

This commit is contained in:
Jan de Mooij
2014-07-12 09:43:06 +02:00
parent cb3e059522
commit bcc76546cb
7 changed files with 61 additions and 21 deletions

View File

@@ -1303,10 +1303,10 @@ _utf8fromidentifier(NPIdentifier id)
}
JSString *str = NPIdentifierToString(id);
nsAutoString autoStr;
AssignJSFlatString(autoStr, JS_ASSERT_STRING_IS_FLAT(str));
return
ToNewUTF8String(nsDependentString(::JS_GetInternedStringChars(str),
::JS_GetStringLength(str)));
return ToNewUTF8String(autoStr);
}
int32_t