Fixed bug #12951 - var if for..in statement should always be of type
string.
This commit is contained in:
rogerl%netscape.com 1999-10-19 21:06:03 +00:00
Родитель 8224322094
Коммит 1beeb9a9fa
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -1439,8 +1439,7 @@ js_Interpret(JSContext *cx, jsval *result)
/* Make sure rval is a string for uniformity and compatibility. */ /* Make sure rval is a string for uniformity and compatibility. */
if (!JSVAL_IS_INT(rval)) { if (!JSVAL_IS_INT(rval)) {
rval = ATOM_KEY((JSAtom *)rval); rval = ATOM_KEY((JSAtom *)rval);
} else if (JSVERSION_1_0 <= cx->version && } else if (cx->version != JSVERSION_1_2) {
cx->version <= JSVERSION_1_1) {
str = js_NumberToString(cx, (jsdouble) JSVAL_TO_INT(rval)); str = js_NumberToString(cx, (jsdouble) JSVAL_TO_INT(rval));
if (!str) { if (!str) {
ok = JS_FALSE; ok = JS_FALSE;