Bug 1146472 part 1. Don't do object-kind guessing for object literal templates in scripts, since we in fact know exactly how many slots we want them to have and hence what the kind should be. r=terrence
This commit is contained in:
@@ -2107,7 +2107,7 @@ JSObject *
|
||||
js::CloneObjectLiteral(JSContext *cx, HandleObject srcObj)
|
||||
{
|
||||
if (srcObj->is<PlainObject>()) {
|
||||
AllocKind kind = GetBackgroundAllocKind(GuessObjectGCKind(srcObj->as<PlainObject>().numFixedSlots()));
|
||||
AllocKind kind = GetBackgroundAllocKind(gc::GetGCObjectKind(srcObj->as<PlainObject>().numFixedSlots()));
|
||||
MOZ_ASSERT_IF(srcObj->isTenured(), kind == srcObj->asTenured().getAllocKind());
|
||||
|
||||
RootedObject proto(cx, cx->global()->getOrCreateObjectPrototype(cx));
|
||||
|
||||
Reference in New Issue
Block a user