Bug 969012 - Do not leak MNewSlots when allocating CallObject in the nursery; r=jonco

--HG--
extra : rebase_source : cffd1f415c8326b4a54a70eafd03fad1f8e3b228
This commit is contained in:
Terrence Cole 2014-02-11 11:53:52 -08:00
parent cc0565b76f
commit 3160a2b98b

View File

@ -511,8 +511,13 @@ JSObject::create(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::Initi
obj->shape_.init(shape);
obj->type_.init(type);
if (extantSlots)
if (extantSlots) {
#ifdef JSGC_GENERATIONAL
if (cx->isJSContext())
cx->asJSContext()->runtime()->gcNursery.notifyInitialSlots(obj, extantSlots);
#endif
obj->slots = extantSlots;
}
obj->elements = js::emptyObjectElements;
if (clasp->hasPrivate())