Bug 547814, r=jorendorff, sr=peterv.

This commit is contained in:
Ben Turner 2010-02-23 10:45:36 -08:00
parent 78ed0e9792
commit 93ebb4ca17

View File

@ -422,6 +422,10 @@ GetStringForArgument(JSContext* aCx,
NS_ASSERTION(aIsJSON && aIsPrimitive, "Null pointer!");
if (JSVAL_IS_STRING(aVal)) {
if (!JS_MakeStringImmutable(aCx, JSVAL_TO_STRING(aVal))) {
return NS_ERROR_FAILURE;
}
*aIsJSON = *aIsPrimitive = PR_FALSE;
_retval = aVal;
return NS_OK;