Avoid assert botch when adding properties to objects, bug 684505.

This commit is contained in:
Brian Hackett 2011-09-29 20:46:33 -07:00
parent 7ac1c16082
commit 7e3df0c914

View File

@ -642,7 +642,7 @@ JSObject::addPropertyInternal(JSContext *cx, jsid id,
bool stableSlot =
(slot == SHAPE_INVALID_SLOT) ||
lastProp->hasMissingSlot() ||
(slot == lastProp->slot() + 1);
(slot == lastProp->maybeSlot() + 1);
JS_ASSERT_IF(!allowDictionary, stableSlot);
if (allowDictionary &&
(!stableSlot || lastProp->entryCount() >= PropertyTree::MAX_HEIGHT)) {