mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1128094 - Watch for OOM failures in assignSnapshot, r=jandem.
This commit is contained in:
parent
9fc98fd805
commit
6998f7a0b7
@ -1403,7 +1403,7 @@ static void
|
||||
MaybeSetRecoversInput(S *mir, T *lir)
|
||||
{
|
||||
MOZ_ASSERT(lir->mirRaw() == mir);
|
||||
if (!mir->fallible())
|
||||
if (!mir->fallible() || !lir->snapshot())
|
||||
return;
|
||||
|
||||
if (lir->output()->policy() != LDefinition::MUST_REUSE_INPUT)
|
||||
@ -1647,7 +1647,7 @@ LIRGenerator::visitStart(MStart *start)
|
||||
LStart *lir = new(alloc()) LStart;
|
||||
assignSnapshot(lir, Bailout_InitialState);
|
||||
|
||||
if (start->startType() == MStart::StartType_Default)
|
||||
if (start->startType() == MStart::StartType_Default && lir->snapshot())
|
||||
lirGraph_.setEntrySnapshot(lir->snapshot());
|
||||
add(lir);
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ LIRGeneratorShared::buildSnapshot(LInstruction *ins, MResumePoint *rp, BailoutKi
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
void
|
||||
LIRGeneratorShared::assignSnapshot(LInstruction *ins, BailoutKind kind)
|
||||
{
|
||||
// assignSnapshot must be called before define/add, since
|
||||
@ -264,11 +264,10 @@ LIRGeneratorShared::assignSnapshot(LInstruction *ins, BailoutKind kind)
|
||||
MOZ_ASSERT(ins->id() == 0);
|
||||
|
||||
LSnapshot *snapshot = buildSnapshot(ins, lastResumePoint_, kind);
|
||||
if (!snapshot)
|
||||
return false;
|
||||
|
||||
ins->assignSnapshot(snapshot);
|
||||
return true;
|
||||
if (snapshot)
|
||||
ins->assignSnapshot(snapshot);
|
||||
else
|
||||
gen->abort("buildSnapshot failed");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -197,7 +197,7 @@ class LIRGeneratorShared : public MDefinitionVisitor
|
||||
// effects (if any), it may check pre-conditions and bailout if they do not
|
||||
// hold. This function informs the register allocator that it will need to
|
||||
// capture appropriate state.
|
||||
bool assignSnapshot(LInstruction *ins, BailoutKind kind);
|
||||
void assignSnapshot(LInstruction *ins, BailoutKind kind);
|
||||
|
||||
// Marks this instruction as needing to call into either the VM or GC. This
|
||||
// function may build a snapshot that captures the result of its own
|
||||
|
Loading…
Reference in New Issue
Block a user