From 547205022519754670c6f7f8ad098fc54a238ab7 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Wed, 21 Feb 2018 10:15:43 +0200 Subject: [PATCH] Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj on a CLOSED TREE --HG-- extra : amend_source : 72f066d9c75ae5ccd4d1e929896a2b12aa0ddc8c --- config/check_spidermonkey_style.py | 2 +- js/src/jsnum.cpp | 2 +- mfbt/JSONWriter.h | 2 +- mfbt/decimal/moz-decimal-utils.h | 2 +- mfbt/double-conversion.h | 17 ----------------- mfbt/moz.build | 1 - .../crashreporter/nsExceptionHandlerUtils.cpp | 2 +- xpcom/string/nsTSubstring.cpp | 7 ++++--- 8 files changed, 9 insertions(+), 26 deletions(-) delete mode 100644 mfbt/double-conversion.h diff --git a/config/check_spidermonkey_style.py b/config/check_spidermonkey_style.py index d608b0eaadd6..5a308e043137 100644 --- a/config/check_spidermonkey_style.py +++ b/config/check_spidermonkey_style.py @@ -61,7 +61,7 @@ included_inclnames_to_ignore = set([ 'ffi.h', # generated in ctypes/libffi/ 'devtools/sharkctl.h', # we ignore devtools/ in general 'devtools/Instruments.h', # we ignore devtools/ in general - 'double-conversion.h', # strange MFBT case + 'double-conversion/double-conversion.h', # strange MFBT case 'javascript-trace.h', # generated in $OBJDIR if HAVE_DTRACE is defined 'frontend/ReservedWordsGenerated.h', # generated in $OBJDIR 'gc/StatsPhasesGenerated.h', # generated in $OBJDIR diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp index 4b14a893a2d7..3d6889895b2f 100644 --- a/js/src/jsnum.cpp +++ b/js/src/jsnum.cpp @@ -11,7 +11,6 @@ #include "jsnum.h" #include "mozilla/ArrayUtils.h" -#include "mozilla/double-conversion.h" #include "mozilla/FloatingPoint.h" #include "mozilla/RangedPtr.h" @@ -24,6 +23,7 @@ #include "jsstr.h" #include "jstypes.h" +#include "double-conversion/double-conversion.h" #include "js/Conversions.h" #include "util/DoubleToString.h" #include "vm/GlobalObject.h" diff --git a/mfbt/JSONWriter.h b/mfbt/JSONWriter.h index 7d44dc7f5b54..0bc2f1d8919d 100644 --- a/mfbt/JSONWriter.h +++ b/mfbt/JSONWriter.h @@ -92,7 +92,7 @@ #ifndef mozilla_JSONWriter_h #define mozilla_JSONWriter_h -#include "mozilla/double-conversion.h" +#include "double-conversion/double-conversion.h" #include "mozilla/IntegerPrintfMacros.h" #include "mozilla/PodOperations.h" #include "mozilla/Sprintf.h" diff --git a/mfbt/decimal/moz-decimal-utils.h b/mfbt/decimal/moz-decimal-utils.h index ca8439ebdb2e..a9caed0143b5 100644 --- a/mfbt/decimal/moz-decimal-utils.h +++ b/mfbt/decimal/moz-decimal-utils.h @@ -10,7 +10,7 @@ // of Decimal.cpp under the Mozilla source without blink core dependencies. Do // not include it into any file other than Decimal.cpp. -#include "../double-conversion/double-conversion/double-conversion.h" +#include "double-conversion/double-conversion.h" #include "mozilla/ArrayUtils.h" #include "mozilla/Casting.h" #include "mozilla/FloatingPoint.h" diff --git a/mfbt/double-conversion.h b/mfbt/double-conversion.h deleted file mode 100644 index 10eae12d8544..000000000000 --- a/mfbt/double-conversion.h +++ /dev/null @@ -1,17 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/* - * A temporary header providing double-conversion functionality until we change - * our code to use the double-conversion header directly. - */ - -#ifndef mozilla_double_conversion_h -#define mozilla_double_conversion_h - -#include "double-conversion/double-conversion.h" - -#endif /* mozilla_double_conversion_h */ diff --git a/mfbt/moz.build b/mfbt/moz.build index 8fbe098319dc..f50ea0f6a6a1 100644 --- a/mfbt/moz.build +++ b/mfbt/moz.build @@ -32,7 +32,6 @@ EXPORTS.mozilla = [ 'DebugOnly.h', 'decimal/Decimal.h', 'DefineEnum.h', - 'double-conversion.h', 'DoublyLinkedList.h', 'EndianUtils.h', 'EnumeratedArray.h', diff --git a/toolkit/crashreporter/nsExceptionHandlerUtils.cpp b/toolkit/crashreporter/nsExceptionHandlerUtils.cpp index 85dec96164a8..3512875a6048 100644 --- a/toolkit/crashreporter/nsExceptionHandlerUtils.cpp +++ b/toolkit/crashreporter/nsExceptionHandlerUtils.cpp @@ -6,7 +6,7 @@ #include "nsExceptionHandlerUtils.h" -#include "mozilla/double-conversion.h" +#include "double-conversion/double-conversion.h" // Format a non-negative double to a string, without using C-library functions, // which need to be avoided (.e.g. bug 1240160, comment 10). Return false if diff --git a/xpcom/string/nsTSubstring.cpp b/xpcom/string/nsTSubstring.cpp index 78bbbd6152ef..4d91c3fcd605 100644 --- a/xpcom/string/nsTSubstring.cpp +++ b/xpcom/string/nsTSubstring.cpp @@ -4,12 +4,13 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsASCIIMask.h" +#include "double-conversion/double-conversion.h" #include "mozilla/CheckedInt.h" -#include "mozilla/double-conversion.h" +#include "mozilla/MathAlgorithms.h" #include "mozilla/MemoryReporting.h" #include "mozilla/Printf.h" -#include "mozilla/MathAlgorithms.h" + +#include "nsASCIIMask.h" using double_conversion::DoubleToStringConverter;