[INFER] Fix parseInt to return integers instead of doubles where possible, rewrite some setNumber calls, bug 662766. r=bhackett

This commit is contained in:
Jan de Mooij
2011-06-08 20:11:42 +02:00
parent e524f14662
commit cb59186efd
3 changed files with 8 additions and 14 deletions

View File

@@ -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;
}