diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /mfbt/double-conversion/ToPrecision-exponential.patch | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'mfbt/double-conversion/ToPrecision-exponential.patch')
-rw-r--r-- | mfbt/double-conversion/ToPrecision-exponential.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mfbt/double-conversion/ToPrecision-exponential.patch b/mfbt/double-conversion/ToPrecision-exponential.patch new file mode 100644 index 000000000..202b29b1b --- /dev/null +++ b/mfbt/double-conversion/ToPrecision-exponential.patch @@ -0,0 +1,35 @@ +1e7bf0c636b8cca54dd83456a0f8fa219343e2a1 Bug 608195 - part 2 - extend ToPrecision to tell use whether exponential notation was used +diff --git a/mfbt/double-conversion/double-conversion.cc b/mfbt/double-conversion/double-conversion.cc +index febba6c..394b6a0 100644 +--- a/mfbt/double-conversion/double-conversion.cc ++++ b/mfbt/double-conversion/double-conversion.cc +@@ -283,7 +283,9 @@ bool DoubleToStringConverter::ToExponential( + + bool DoubleToStringConverter::ToPrecision(double value, + int precision, ++ bool* used_exponential_notation, + StringBuilder* result_builder) const { ++ *used_exponential_notation = false; + if (Double(value).IsSpecial()) { + return HandleSpecialValues(value, result_builder); + } +@@ -325,6 +327,7 @@ bool DoubleToStringConverter::ToPrecision(double value, + decimal_rep[i] = '0'; + } + ++ *used_exponential_notation = true; + CreateExponentialRepresentation(decimal_rep, + precision, + exponent, +diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h +index 0900ba0..957575c 100644 +--- a/mfbt/double-conversion/double-conversion.h ++++ b/mfbt/double-conversion/double-conversion.h +@@ -270,6 +270,7 @@ class DoubleToStringConverter { + // exponent character, the exponent's sign, and at most 3 exponent digits). + MFBT_API bool ToPrecision(double value, + int precision, ++ bool* used_exponential_notation, + StringBuilder* result_builder) const; + + enum DtoaMode { |