Bug 1180049 - Add OOM check in MNewArray constructor. r=bhackett

This commit is contained in:
Jan de Mooij 2015-07-15 19:11:55 +02:00
parent a4611fd7b1
commit 3103c8e33d

View File

@ -4103,12 +4103,13 @@ MNewArray::MNewArray(CompilerConstraintList* constraints, uint32_t count, MConst
{
setResultType(MIRType_Object);
if (templateObject()) {
TemporaryTypeSet* types = MakeSingletonTypeSet(constraints, templateObject());
if (TemporaryTypeSet* types = MakeSingletonTypeSet(constraints, templateObject())) {
setResultTypeSet(types);
if (types->convertDoubleElements(constraints) == TemporaryTypeSet::AlwaysConvertToDoubles)
convertDoubleElements_ = true;
}
}
}
bool
MNewArray::shouldUseVM() const