зеркало из https://github.com/mozilla/pjs.git
Fix bug in which leaving the JS version as JSVERSION_DEFAULT would return
all enumerated property names as strings, as was the case in JS1.1, instead of the modern (>=JS1.2) behavior of allowing either string or integer property names.
This commit is contained in:
Родитель
69e26c8efd
Коммит
b68f47ddfe
|
@ -1312,7 +1312,8 @@ js_Interpret(JSContext *cx, jsval *result)
|
|||
/* Make sure rval is a string for uniformity and compatibility. */
|
||||
if (!JSVAL_IS_INT(rval)) {
|
||||
rval = ATOM_KEY((JSAtom *)rval);
|
||||
} else if (cx->version < JSVERSION_1_2) {
|
||||
} else if ((cx->version <= JSVERSION_1_1) &&
|
||||
(cx->version >= JSVERSION_1_0)) {
|
||||
str = js_NumberToString(cx, (jsdouble) JSVAL_TO_INT(rval));
|
||||
if (!str) {
|
||||
ok = JS_FALSE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче