bug 610198 - Replacing JS_GetStringBytes usage with JS_EncodeString. r=gal

This commit is contained in:
Igor Bukanov
2010-11-02 15:36:25 +01:00
parent df66f2eee9
commit f73bb91440
49 changed files with 796 additions and 576 deletions

View File

@@ -417,9 +417,11 @@ GetCustomIterator(JSContext *cx, JSObject *obj, uintN flags, Value *vp)
* We are always coming from js_ValueToIterator, and we are no longer on
* trace, so the object we are iterating over is on top of the stack (-1).
*/
JSAutoByteString bytes;
if (!js_AtomToPrintableString(cx, atom, &bytes))
return false;
js_ReportValueError2(cx, JSMSG_BAD_TRAP_RETURN_VALUE,
-1, ObjectValue(*obj), NULL,
js_AtomToPrintableString(cx, atom));
-1, ObjectValue(*obj), NULL, bytes.ptr());
return false;
}
return true;