Bug 462060 - TM: JIT: Initializing an array to a constant in a loop doesn't work for some constant values. r=brendan

This commit is contained in:
Jeff Walden
2008-11-15 16:42:35 -08:00
parent b99c1b3fc7
commit 5f0e0f46f7
2 changed files with 13 additions and 1 deletions

View File

@@ -105,7 +105,7 @@ jsval FASTCALL
js_BoxDouble(JSContext* cx, jsdouble d)
{
int32 i;
if (JSDOUBLE_IS_INT(d, i))
if (JSDOUBLE_IS_INT(d, i) && INT_FITS_IN_JSVAL(i))
return INT_TO_JSVAL(i);
JS_ASSERT(JS_ON_TRACE(cx));
jsval v; /* not rooted but ok here because we know GC won't run */