Bug 707061 - Rename js_ValueToString to ToString. Also, consistent with ToObject, make ToString include an inline already-string fast path, and make ToStringSlow be an out-of-line slow path for the case where the value is not a string (asserting that this is the case). r=luke
This commit is contained in:
@@ -1053,7 +1053,7 @@ js_IteratorNext(JSContext *cx, JSObject *iterobj, Value *rval)
|
||||
if (rval->isInt32() && StaticStrings::hasInt(i = rval->toInt32())) {
|
||||
str = cx->runtime->staticStrings.getInt(i);
|
||||
} else {
|
||||
str = js_ValueToString(cx, *rval);
|
||||
str = ToString(cx, *rval);
|
||||
if (!str)
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user