Bug 845573 - Allocate singletons discovered by the parser in tenured; r=bhackett

This commit is contained in:
Terrence Cole 2013-02-26 15:29:32 -08:00
parent 8803c37f35
commit b985534696

View File

@ -3422,7 +3422,7 @@ ParseNode::getConstantValue(JSContext *cx, bool strictChecks, MutableHandleValue
case PNK_ARRAY: {
JS_ASSERT(isOp(JSOP_NEWINIT) && !(pn_xflags & PNX_NONCONST));
RootedObject obj(cx, NewDenseAllocatedArray(cx, pn_count));
RootedObject obj(cx, NewDenseAllocatedArray(cx, pn_count, NULL, MaybeSingletonObject));
if (!obj)
return false;
@ -3446,7 +3446,7 @@ ParseNode::getConstantValue(JSContext *cx, bool strictChecks, MutableHandleValue
JS_ASSERT(isOp(JSOP_NEWINIT) && !(pn_xflags & PNX_NONCONST));
gc::AllocKind kind = GuessObjectGCKind(pn_count);
RootedObject obj(cx, NewBuiltinClassInstance(cx, &ObjectClass, kind));
RootedObject obj(cx, NewBuiltinClassInstance(cx, &ObjectClass, kind, MaybeSingletonObject));
if (!obj)
return false;