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:
Jeff Walden
2011-12-01 19:35:44 -08:00
parent 0c1c9fe724
commit 477d66175a
22 changed files with 113 additions and 108 deletions

View File

@@ -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;
}