Flexible length JSObject, bug 584917. r=brendan,igor

This commit is contained in:
Brian Hackett
2010-10-13 11:49:22 -07:00
parent f33cac8c13
commit 462c3fd58a
48 changed files with 1286 additions and 1367 deletions

View File

@@ -2563,7 +2563,9 @@ JS_FRIEND_API(JSObject *)
js_NewDateObjectMsec(JSContext *cx, jsdouble msec_time)
{
JSObject *obj = NewBuiltinClassInstance(cx, &js_DateClass);
if (!obj || !SetUTCTime(cx, obj, msec_time))
if (!obj || !obj->ensureSlots(cx, JSObject::DATE_CLASS_RESERVED_SLOTS))
return NULL;
if (!SetUTCTime(cx, obj, msec_time))
return NULL;
return obj;
}