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
Родитель e1d31d5039
Коммит 3d9a75a481
2 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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
{