Bug 671143 - Rename ValueToNumber to ToNumber, to be more like the spec nomenclature. r=cdleary

This commit is contained in:
Jeff Walden
2011-06-13 21:49:59 -07:00
parent 866e25d48b
commit 0cb11915d2
15 changed files with 83 additions and 111 deletions

View File

@@ -555,7 +555,7 @@ array_length_setter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, Value
return false;
jsdouble d;
if (!ValueToNumber(cx, *vp, &d))
if (!ToNumber(cx, *vp, &d))
return false;
if (d != newlen) {
@@ -1737,7 +1737,7 @@ sort_compare(void *arg, const void *a, const void *b, int *result)
return JS_FALSE;
jsdouble cmp;
if (!ValueToNumber(cx, session.rval(), &cmp))
if (!ToNumber(cx, session.rval(), &cmp))
return JS_FALSE;
/* Clamp cmp to -1, 0, 1. */