зеркало из https://github.com/mozilla/pjs.git
Bug 664009 - Fix a minor array bug that happens to break some code. r=jwalden, a=clegnitto
This commit is contained in:
Родитель
09b193a5b1
Коммит
b67b43525f
|
@ -2806,7 +2806,8 @@ array_extra(JSContext *cx, ArrayExtraMode mode, uintN argc, Value *vp)
|
|||
newlen = 0;
|
||||
newarr = NULL;
|
||||
#endif
|
||||
jsint start = 0, end = length, step = 1;
|
||||
jsuint start = 0, end = length;
|
||||
jsint step = 1;
|
||||
|
||||
switch (mode) {
|
||||
case REDUCE_RIGHT:
|
||||
|
@ -2875,7 +2876,7 @@ array_extra(JSContext *cx, ArrayExtraMode mode, uintN argc, Value *vp)
|
|||
|
||||
Value objv = ObjectValue(*obj);
|
||||
AutoValueRooter tvr(cx);
|
||||
for (jsint i = start; i != end; i += step) {
|
||||
for (jsuint i = start; i != end; i += step) {
|
||||
JSBool hole;
|
||||
ok = JS_CHECK_OPERATION_LIMIT(cx) &&
|
||||
GetElement(cx, obj, i, &hole, tvr.addr());
|
||||
|
|
Загрузка…
Ссылка в новой задаче