mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 845573 - Allocate singletons discovered by the parser in tenured; r=bhackett
This commit is contained in:
parent
8803c37f35
commit
b985534696
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user