Bug 916612 - don't set shortid for CallObject properties (r=wingo)

--HG--
extra : rebase_source : 8f311bd1a4d9a3bbe35f433ebf6923989a4081b5
This commit is contained in:
Luke Wagner 2014-01-16 10:23:19 -06:00
parent d08877c482
commit c33c55d6c6

View File

@ -99,7 +99,7 @@ Bindings::initWithTemporaryStorage(ExclusiveContext *cx, InternalBindingsHandle
gc::AllocKind allocKind = gc::FINALIZE_OBJECT2_BACKGROUND;
JS_ASSERT(gc::GetGCKindSlots(allocKind) == CallObject::RESERVED_SLOTS);
RootedShape initial(cx,
EmptyShape::getInitialShape(cx, &CallObject::class_, nullptr, cx->global(), nullptr,
EmptyShape::getInitialShape(cx, &CallObject::class_, nullptr, nullptr, nullptr,
allocKind, BaseShape::VAROBJ | BaseShape::DELEGATE));
if (!initial)
return false;
@ -134,8 +134,7 @@ Bindings::initWithTemporaryStorage(ExclusiveContext *cx, InternalBindingsHandle
RootedId id(cx, NameToId(bi->name()));
unsigned attrs = JSPROP_PERMANENT | JSPROP_ENUMERATE |
(bi->kind() == CONSTANT ? JSPROP_READONLY : 0);
unsigned frameIndex = bi.frameIndex();
StackShape child(nbase, id, slot++, 0, attrs, Shape::HAS_SHORTID, frameIndex);
StackShape child(nbase, id, slot++, 0, attrs, 0, 0);
Shape *shape = self->callObjShape_->getChildBinding(cx, child);
if (!shape)