Be careful when using setDouble that we shouldn't use setNumber instead to fit in an int when possible. Was missing a lot in jsdate.cpp
This commit is contained in:
@@ -3161,7 +3161,7 @@ JS_DefineConstDoubles(JSContext *cx, JSObject *obj, JSConstDoubleSpec *cds)
|
||||
|
||||
CHECK_REQUEST(cx);
|
||||
for (ok = JS_TRUE; cds->name; cds++) {
|
||||
Value value(DoubleTag(cds->dval));
|
||||
Value value = DoubleTag(cds->dval);
|
||||
attrs = cds->flags;
|
||||
if (!attrs)
|
||||
attrs = JSPROP_READONLY | JSPROP_PERMANENT;
|
||||
|
||||
Reference in New Issue
Block a user