Backed out changeset 8361462f2a02 (
bug 1125389) for mochitest asserts.
--- a/js/src/vm/Shape.cpp
+++ b/js/src/vm/Shape.cpp
@@ -635,22 +635,17 @@ js::NewReshapedObject(JSContext *cx, Han
while (!nshape->isEmptyShape()) {
ids[nshape->slot()].set(nshape->propid());
nshape = nshape->previous();
}
}
/* Construct the new shape, without updating type information. */
RootedId id(cx);
- RootedShape newShape(cx, EmptyShape::getInitialShape(cx, res->getClass(),
- res->getTaggedProto(),
- res->getMetadata(),
- res->getParent(),
- res->numFixedSlots(),
- shape->getObjectFlags()));
+ RootedShape newShape(cx, res->lastProperty());
for (unsigned i = 0; i < ids.length(); i++) {
id = ids[i];
MOZ_ASSERT(!res->contains(cx, id));
uint32_t index;
bool indexed = js_IdIsIndex(id, &index);
Rooted<UnownedBaseShape*> nbase(cx, newShape->base()->unowned());