1370922 - [Ion] Handle allocation failure when generating Math.min.

1370922 - [Ion] Handle allocation failure when generating Math.min.
This commit is contained in:
win7-7 2025-12-27 08:08:45 +02:00 committed by wuggy
commit 5741caf9b2

View file

@ -1312,7 +1312,9 @@ IonBuilder::inlineMathMinMax(CallInfo& callInfo, bool max)
current->add(last);
for (unsigned i = 2; i < cases.length(); i++) {
MMinMax* ins = MMinMax::New(alloc(), last, cases[i], returnType, max);
MMinMax* ins = MMinMax::New(alloc().fallible(), last, cases[i], returnType, max);
if (!ins)
return abort(AbortReason::Alloc);
current->add(ins);
last = ins;
}