зеркало из https://github.com/mozilla/pjs.git
Don't throw when given |for (i in null)| to match SpiderMonkey and to match users' expectations. bug 333911, r=brendan
This commit is contained in:
Родитель
ece247f035
Коммит
e9fcd71957
|
@ -351,7 +351,10 @@ function execute(n, x) {
|
||||||
execute(u, x);
|
execute(u, x);
|
||||||
r = n.iterator;
|
r = n.iterator;
|
||||||
s = execute(n.object, x);
|
s = execute(n.object, x);
|
||||||
t = toObject(getValue(s), s, n.object);
|
v = getValue(s);
|
||||||
|
|
||||||
|
// ECMA erratum: allow for (i in null)
|
||||||
|
t = v && toObject(v, s, n.object);
|
||||||
a = [];
|
a = [];
|
||||||
for (i in t)
|
for (i in t)
|
||||||
a.push(i);
|
a.push(i);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче