components/desktop/firefox/patches/firefox-16-mftt_infinity.patch
author Stacy Yeh <stacy.yeh@oracle.com>
Tue, 01 Mar 2016 12:56:53 -0800
changeset 5527 611b2d6efdfe
parent 5255 components/desktop/firefox/patches/firefox27-80-mftt_infinity.patch@cea0e462549a
permissions -rw-r--r--
21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes 22757279 Update Thunderbird to version 38.5.0 22613259 thunderbird lightning extension is missing l10n after moved to userland 21133062 problem in TBIRD/MAILER

We use a different function from the one in ieeefp.h.
This may be a studio specific patch. Need to investigate if this can be
removed.

diff --git a/mfbt/decimal/Decimal.cpp b/mfbt/decimal/Decimal.cpp
--- a/mfbt/decimal/Decimal.cpp
+++ b/mfbt/decimal/Decimal.cpp
@@ -33,6 +33,7 @@
 
 #include <algorithm>
 #include <float.h>
+#include <ieeefp.h>
 
 using namespace moz_decimal_utils;
 
@@ -686,13 +687,13 @@
 
 Decimal Decimal::fromDouble(double doubleValue)
 {
-    if (std::isfinite(doubleValue))
+    if (finite(doubleValue))
         return fromString(mozToString(doubleValue));
 
-    if (std::isinf(doubleValue))
-        return infinity(doubleValue < 0 ? Negative : Positive);
+    if (isnand(doubleValue))
+        return nan();
 
-    return nan();
+    return infinity(doubleValue < 0 ? Negative : Positive);
 }
 
 Decimal Decimal::fromString(const String& str)