Bumping manifests a=b2g-bump
[gecko.git] / mfbt / double-conversion / ToPrecision-exponential.patch
blob202b29b1ba3b6046fde31c7dfefe0136b14fd8d6
1 1e7bf0c636b8cca54dd83456a0f8fa219343e2a1 Bug 608195 - part 2 - extend ToPrecision to tell use whether exponential notation was used
2 diff --git a/mfbt/double-conversion/double-conversion.cc b/mfbt/double-conversion/double-conversion.cc
3 index febba6c..394b6a0 100644
4 --- a/mfbt/double-conversion/double-conversion.cc
5 +++ b/mfbt/double-conversion/double-conversion.cc
6 @@ -283,7 +283,9 @@ bool DoubleToStringConverter::ToExponential(
8 bool DoubleToStringConverter::ToPrecision(double value,
9 int precision,
10 + bool* used_exponential_notation,
11 StringBuilder* result_builder) const {
12 + *used_exponential_notation = false;
13 if (Double(value).IsSpecial()) {
14 return HandleSpecialValues(value, result_builder);
16 @@ -325,6 +327,7 @@ bool DoubleToStringConverter::ToPrecision(double value,
17 decimal_rep[i] = '0';
20 + *used_exponential_notation = true;
21 CreateExponentialRepresentation(decimal_rep,
22 precision,
23 exponent,
24 diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h
25 index 0900ba0..957575c 100644
26 --- a/mfbt/double-conversion/double-conversion.h
27 +++ b/mfbt/double-conversion/double-conversion.h
28 @@ -270,6 +270,7 @@ class DoubleToStringConverter {
29 // exponent character, the exponent's sign, and at most 3 exponent digits).
30 MFBT_API bool ToPrecision(double value,
31 int precision,
32 + bool* used_exponential_notation,
33 StringBuilder* result_builder) const;
35 enum DtoaMode {