Bug 1451908 - Check for infinite value in txFormatNumberFunctionCall. r=peterv a=abillings

This commit is contained in:
Eric Rahm 2018-04-17 11:22:04 -07:00
Родитель 8489323f79
Коммит ec9d567f14
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -271,6 +271,12 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext,
aResult);
}
// Make sure the multiplier didn't push value to infinity.
if (value == mozilla::PositiveInfinity<double>()) {
return aContext->recycler()->getStringResult(format->mInfinity,
aResult);
}
// Prefix
nsAutoString res(prefix);