[INFER] Fix parseInt to return integers instead of doubles where possible, rewrite some setNumber calls, bug 662766. r=bhackett
This commit is contained in:
@@ -2906,8 +2906,7 @@ array_indexOfHelper(JSContext *cx, JSBool isLast, uintN argc, Value *vp)
|
||||
if (!StrictlyEqual(cx, *vp, tosearch, &equal))
|
||||
return JS_FALSE;
|
||||
if (equal) {
|
||||
vp->setNumber(i);
|
||||
if (!vp->isInt32())
|
||||
if (!vp->setNumber(i))
|
||||
MarkTypeCallerOverflow(cx);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user