| 1 |
diff --git a/double-conversion/utils.h b/double-conversion/utils.h |
| 2 |
--- a/double-conversion/utils.h |
| 3 |
+++ b/double-conversion/utils.h |
| 4 |
@@ -36,27 +36,29 @@ |
| 5 |
|
| 6 |
// For pre-C++11 compatibility |
| 7 |
#if __cplusplus >= 201103L |
| 8 |
#define DOUBLE_CONVERSION_NULLPTR nullptr |
| 9 |
#else |
| 10 |
#define DOUBLE_CONVERSION_NULLPTR NULL |
| 11 |
#endif |
| 12 |
|
| 13 |
-#include <cassert> |
| 14 |
+#include "mozilla/Assertions.h" |
| 15 |
+ |
| 16 |
#ifndef DOUBLE_CONVERSION_ASSERT |
| 17 |
#define DOUBLE_CONVERSION_ASSERT(condition) \ |
| 18 |
- assert(condition) |
| 19 |
+ MOZ_ASSERT(condition) |
| 20 |
#endif |
| 21 |
#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(ASSERT) |
| 22 |
#define ASSERT DOUBLE_CONVERSION_ASSERT |
| 23 |
#endif |
| 24 |
|
| 25 |
#ifndef DOUBLE_CONVERSION_UNIMPLEMENTED |
| 26 |
-#define DOUBLE_CONVERSION_UNIMPLEMENTED() (abort()) |
| 27 |
+#define DOUBLE_CONVERSION_UNIMPLEMENTED() \ |
| 28 |
+ MOZ_CRASH("DOUBLE_CONVERSION_UNIMPLEMENTED") |
| 29 |
#endif |
| 30 |
#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNIMPLEMENTED) |
| 31 |
#define UNIMPLEMENTED DOUBLE_CONVERSION_UNIMPLEMENTED |
| 32 |
#endif |
| 33 |
|
| 34 |
#ifndef DOUBLE_CONVERSION_NO_RETURN |
| 35 |
#ifdef _MSC_VER |
| 36 |
#define DOUBLE_CONVERSION_NO_RETURN __declspec(noreturn) |
| 37 |
@@ -66,20 +68,21 @@ |
| 38 |
#endif |
| 39 |
#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(NO_RETURN) |
| 40 |
#define NO_RETURN DOUBLE_CONVERSION_NO_RETURN |
| 41 |
#endif |
| 42 |
|
| 43 |
#ifndef DOUBLE_CONVERSION_UNREACHABLE |
| 44 |
#ifdef _MSC_VER |
| 45 |
void DOUBLE_CONVERSION_NO_RETURN abort_noreturn(); |
| 46 |
-inline void abort_noreturn() { abort(); } |
| 47 |
+inline void abort_noreturn() { MOZ_CRASH("abort_noreturn"); } |
| 48 |
#define DOUBLE_CONVERSION_UNREACHABLE() (abort_noreturn()) |
| 49 |
#else |
| 50 |
-#define DOUBLE_CONVERSION_UNREACHABLE() (abort()) |
| 51 |
+#define DOUBLE_CONVERSION_UNREACHABLE() \ |
| 52 |
+ MOZ_CRASH("DOUBLE_CONVERSION_UNREACHABLE") |
| 53 |
#endif |
| 54 |
#endif |
| 55 |
#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNREACHABLE) |
| 56 |
#define UNREACHABLE DOUBLE_CONVERSION_UNREACHABLE |
| 57 |
#endif |
| 58 |
|
| 59 |
// Not all compilers support __has_attribute and combining a check for both |
| 60 |
// ifdef and __has_attribute on the same preprocessor line isn't portable. |