Bug 572945 - TM: dense arrays specify the wrong number of reserved slots (2

vs 3).  r=gal.
This commit is contained in:
Nicholas Nethercote 2010-06-22 00:18:51 -07:00
parent 690a859635
commit 6f97ec3b23
2 changed files with 3 additions and 1 deletions

View File

@ -1086,7 +1086,7 @@ array_getObjectOps(JSContext *cx, JSClass *clasp)
JSClass js_ArrayClass = {
"Array",
JSCLASS_HAS_RESERVED_SLOTS(2) |
JSCLASS_HAS_RESERVED_SLOTS(JSObject::DENSE_ARRAY_FIXED_RESERVED_SLOTS) |
JSCLASS_HAS_CACHED_PROTO(JSProto_Array),
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
JS_EnumerateStub, JS_ResolveStub, js_TryValueOf, array_finalize,

View File

@ -444,6 +444,8 @@ struct JSObject {
inline uint32 uncheckedGetDenseArrayCapacity() const;
public:
static const uint32 DENSE_ARRAY_FIXED_RESERVED_SLOTS = 3;
inline uint32 getArrayLength() const;
inline void setDenseArrayLength(uint32 length);
inline void setSlowArrayLength(uint32 length);