Mac bustage fix for bug 556187. r=brendan via IRC.

This commit is contained in:
Nicholas Nethercote 2010-04-06 12:16:37 +10:00
parent 4542317997
commit 46b653e0e1
2 changed files with 9 additions and 2 deletions

View File

@ -393,8 +393,10 @@ struct JSObject {
static const uint32 JSSLOT_ARRAY_COUNT = JSSLOT_PRIVATE + 1;
static const uint32 JSSLOT_ARRAY_UNUSED = JSSLOT_PRIVATE + 2;
// This must remain true; see comment in js_MakeArraySlow().
JS_STATIC_ASSERT(JSSLOT_ARRAY_LENGTH == JSSLOT_PRIVATE);
// This assertion must remain true; see comment in js_MakeArraySlow().
// (Nb: This method is never called, it just contains a static assertion.
// The static assertion isn't inline because that doesn't work on Mac.)
inline void staticAssertArrayLengthIsInPrivateSlot();
public:
inline uint32 getArrayLength() const;

View File

@ -81,6 +81,11 @@ JSObject::setSlotMT(JSContext *cx, uintN slot, jsval value)
#endif
}
inline void JSObject::staticAssertArrayLengthIsInPrivateSlot()
{
JS_STATIC_ASSERT(JSSLOT_ARRAY_LENGTH == JSSLOT_PRIVATE);
}
inline uint32
JSObject::getArrayLength() const
{