Bug 1451908 - Check for infinite value in txFormatNumberFunctionCall. r=peterv a=abillings
authorEric Rahm <erahm@mozilla.com>
Tue, 17 Apr 2018 11:22:04 -0700
changeset 471698 f3ad04730dd303ef877104fd534b144f1d23a49f
parent 471697 26e036b1c7030f8fcbb6975d1a91a4750a88c2d6
child 471699 24893a95845db11f6fcd5761880d5b4263f060be
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv, abillings
bugs1451908
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1451908 - Check for infinite value in txFormatNumberFunctionCall. r=peterv a=abillings
dom/xslt/xslt/txFormatNumberFunctionCall.cpp
--- a/dom/xslt/xslt/txFormatNumberFunctionCall.cpp
+++ b/dom/xslt/xslt/txFormatNumberFunctionCall.cpp
@@ -266,16 +266,22 @@ txFormatNumberFunctionCall::evaluate(txI
     value = fabs(value) * multiplier;
 
     // Make sure the multiplier didn't push value to infinity.
     if (value == mozilla::PositiveInfinity<double>()) {
         return aContext->recycler()->getStringResult(format->mInfinity,
                                                      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);
 
     int bufsize;
     if (value > 1)
         bufsize = (int)log10(value) + 30;
     else
         bufsize = 1 + 30;