mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1264948 - MBasicBlock::inherit, check for OOMs when allocating Phi nodes. r=h4writer
This commit is contained in:
parent
9676f23598
commit
1710de95c9
@ -558,7 +558,9 @@ MBasicBlock::inherit(TempAllocator& alloc, BytecodeAnalysis* analysis, MBasicBlo
|
||||
if (kind_ == PENDING_LOOP_HEADER) {
|
||||
size_t i = 0;
|
||||
for (i = 0; i < info().firstStackSlot(); i++) {
|
||||
MPhi* phi = MPhi::New(alloc);
|
||||
MPhi* phi = MPhi::New(alloc.fallible());
|
||||
if (!phi)
|
||||
return false;
|
||||
phi->addInlineInput(pred->getSlot(i));
|
||||
addPhi(phi);
|
||||
setSlot(i, phi);
|
||||
@ -578,7 +580,9 @@ MBasicBlock::inherit(TempAllocator& alloc, BytecodeAnalysis* analysis, MBasicBlo
|
||||
}
|
||||
|
||||
for (; i < stackDepth(); i++) {
|
||||
MPhi* phi = MPhi::New(alloc);
|
||||
MPhi* phi = MPhi::New(alloc.fallible());
|
||||
if (!phi)
|
||||
return false;
|
||||
phi->addInlineInput(pred->getSlot(i));
|
||||
addPhi(phi);
|
||||
setSlot(i, phi);
|
||||
|
Loading…
x
Reference in New Issue
Block a user