зеркало из https://github.com/mozilla/gecko-dev.git
Fix for(i in null) and for(i in undefined) to error per ECMA, rather than iterating zero times (121744, r=khanson, sr=shaver).
This commit is contained in:
Родитель
1099de413c
Коммит
fdf6f6bfee
|
@ -1576,9 +1576,11 @@ js_Interpret(JSContext *cx, jsval *result)
|
|||
|
||||
case JSOP_TOOBJECT:
|
||||
SAVE_SP(fp);
|
||||
ok = js_ValueToObject(cx, FETCH_OPND(-1), &obj);
|
||||
if (!ok)
|
||||
obj = js_ValueToNonNullObject(cx, FETCH_OPND(-1));
|
||||
if (!obj) {
|
||||
ok = JS_FALSE;
|
||||
goto out;
|
||||
}
|
||||
STORE_OPND(-1, OBJECT_TO_JSVAL(obj));
|
||||
break;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче