Bug 758669 - Don't use int32 in JSHistogram_Add; r=taras

This commit is contained in:
Ms2ger 2012-06-06 09:22:24 +02:00
parent b036a6ed71
commit 5f583c504f

View File

@ -380,13 +380,13 @@ JSHistogram_Add(JSContext *cx, unsigned argc, jsval *vp)
}
jsval v = JS_ARGV(cx, vp)[0];
int32 value;
if (!(JSVAL_IS_NUMBER(v) || JSVAL_IS_BOOLEAN(v))) {
JS_ReportError(cx, "Not a number");
return JS_FALSE;
}
int32_t value;
if (!JS_ValueToECMAInt32(cx, v, &value)) {
return JS_FALSE;
}