From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- mfbt/double-conversion/to-fixed-dbl-max.patch | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 mfbt/double-conversion/to-fixed-dbl-max.patch (limited to 'mfbt/double-conversion/to-fixed-dbl-max.patch') diff --git a/mfbt/double-conversion/to-fixed-dbl-max.patch b/mfbt/double-conversion/to-fixed-dbl-max.patch new file mode 100644 index 0000000000..3b1cbf0b45 --- /dev/null +++ b/mfbt/double-conversion/to-fixed-dbl-max.patch @@ -0,0 +1,51 @@ +diff --git a/mfbt/double-conversion/double-conversion/double-to-string.cc b/mfbt/double-conversion/double-conversion/double-to-string.cc +--- a/mfbt/double-conversion/double-conversion/double-to-string.cc ++++ b/mfbt/double-conversion/double-conversion/double-to-string.cc +@@ -207,25 +207,21 @@ bool DoubleToStringConverter::ToShortest + } + return true; + } + + + bool DoubleToStringConverter::ToFixed(double value, + int requested_digits, + StringBuilder* result_builder) const { +- DOUBLE_CONVERSION_ASSERT(kMaxFixedDigitsBeforePoint == 60); +- const double kFirstNonFixed = 1e60; +- + if (Double(value).IsSpecial()) { + return HandleSpecialValues(value, result_builder); + } + + if (requested_digits > kMaxFixedDigitsAfterPoint) return false; +- if (value >= kFirstNonFixed || value <= -kFirstNonFixed) return false; + + // Find a sufficiently precise decimal representation of n. + int decimal_point; + bool sign; + // Add space for the '\0' byte. + const int kDecimalRepCapacity = + kMaxFixedDigitsBeforePoint + kMaxFixedDigitsAfterPoint + 1; + char decimal_rep[kDecimalRepCapacity]; +diff --git a/mfbt/double-conversion/double-conversion/double-to-string.h b/mfbt/double-conversion/double-conversion/double-to-string.h +--- a/mfbt/double-conversion/double-conversion/double-to-string.h ++++ b/mfbt/double-conversion/double-conversion/double-to-string.h +@@ -33,17 +33,17 @@ + + namespace double_conversion { + + class DoubleToStringConverter { + public: + // When calling ToFixed with a double > 10^kMaxFixedDigitsBeforePoint + // or a requested_digits parameter > kMaxFixedDigitsAfterPoint then the + // function returns false. +- static const int kMaxFixedDigitsBeforePoint = 60; ++ static const int kMaxFixedDigitsBeforePoint = 308; + static const int kMaxFixedDigitsAfterPoint = 100; + + // When calling ToExponential with a requested_digits + // parameter > kMaxExponentialDigits then the function returns false. + static const int kMaxExponentialDigits = 120; + + // When calling ToPrecision with a requested_digits + // parameter < kMinPrecisionDigits or requested_digits > kMaxPrecisionDigits -- cgit v1.2.3