Backed out changeset e7414bbec32d (bug 1369994) for rooting hazard failures

MozReview-Commit-ID: 4cdxaJ3Mbz7
This commit is contained in:
Phil Ringnalda 2017-06-26 19:48:44 -07:00
parent acb19ed934
commit 98a82deb22

View File

@ -578,6 +578,11 @@ class TypedArrayObjectTemplate : public TypedArrayObject
RootedObject tmp(cx, NewBuiltinClassInstance(cx, clasp, allocKind, newKind));
if (!tmp)
return nullptr;
if (script && !ObjectGroup::setAllocationSiteObjectGroup(cx, script, pc, tmp,
newKind == SingletonObject))
{
return nullptr;
}
TypedArrayObject* tarray = &tmp->as<TypedArrayObject>();
initTypedArraySlots(cx, tarray, len);
@ -587,12 +592,6 @@ class TypedArrayObjectTemplate : public TypedArrayObject
// nullptr and avoid allocating memory that will never be used.
tarray->initPrivate(nullptr);
if (script && !ObjectGroup::setAllocationSiteObjectGroup(cx, script, pc, tmp,
newKind == SingletonObject))
{
return nullptr;
}
return tarray;
}