Bug 916993 - Handlify the public JSString APIs; r=bz,jonco

This commit is contained in:
Terrence Cole
2013-09-16 18:33:40 -07:00
parent fb8232acd1
commit 6ae88af681
13 changed files with 52 additions and 60 deletions

View File

@@ -1046,7 +1046,7 @@ PluginScriptableObjectParent::AnswerEnumerate(InfallibleTArray<PPluginIdentifier
// Because of GC hazards, all identifiers returned from enumerate
// must be made permanent.
if (_identifierisstring(ids[index])) {
JSString* str = NPIdentifierToString(ids[index]);
JS::RootedString str(cx, NPIdentifierToString(ids[index]));
if (!JS_StringHasBeenInterned(cx, str)) {
DebugOnly<JSString*> str2 = JS_InternJSString(cx, str);
NS_ASSERTION(str2 == str, "Interning a JS string which is currently an ID should return itself.");