зеркало из https://github.com/mozilla/gecko-dev.git
49 строки
1.6 KiB
Diff
49 строки
1.6 KiB
Diff
diff --git a/mfbt/double-conversion/double-conversion/utils.h b/mfbt/double-conversion/double-conversion/utils.h
|
|
index c72c333f020a1..6022132e2b495 100644
|
|
--- a/mfbt/double-conversion/double-conversion/utils.h
|
|
+++ b/mfbt/double-conversion/double-conversion/utils.h
|
|
@@ -26,38 +26,38 @@
|
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#ifndef DOUBLE_CONVERSION_UTILS_H_
|
|
#define DOUBLE_CONVERSION_UTILS_H_
|
|
|
|
#include <cstdlib>
|
|
#include <cstring>
|
|
|
|
-#include <cassert>
|
|
+#include "mozilla/Assertions.h"
|
|
#ifndef DOUBLE_CONVERSION_ASSERT
|
|
#define DOUBLE_CONVERSION_ASSERT(condition) \
|
|
- assert(condition);
|
|
+ MOZ_ASSERT(condition)
|
|
#endif
|
|
#ifndef DOUBLE_CONVERSION_UNIMPLEMENTED
|
|
-#define DOUBLE_CONVERSION_UNIMPLEMENTED() (abort())
|
|
+#define DOUBLE_CONVERSION_UNIMPLEMENTED() MOZ_CRASH()
|
|
#endif
|
|
#ifndef DOUBLE_CONVERSION_NO_RETURN
|
|
#ifdef _MSC_VER
|
|
#define DOUBLE_CONVERSION_NO_RETURN __declspec(noreturn)
|
|
#else
|
|
#define DOUBLE_CONVERSION_NO_RETURN __attribute__((noreturn))
|
|
#endif
|
|
#endif
|
|
#ifndef DOUBLE_CONVERSION_UNREACHABLE
|
|
#ifdef _MSC_VER
|
|
void DOUBLE_CONVERSION_NO_RETURN abort_noreturn();
|
|
-inline void abort_noreturn() { abort(); }
|
|
+inline void abort_noreturn() { MOZ_CRASH(); }
|
|
#define DOUBLE_CONVERSION_UNREACHABLE() (abort_noreturn())
|
|
#else
|
|
-#define DOUBLE_CONVERSION_UNREACHABLE() (abort())
|
|
+#define DOUBLE_CONVERSION_UNREACHABLE() MOZ_CRASH()
|
|
#endif
|
|
#endif
|
|
|
|
// Not all compilers support __has_attribute and combining a check for both
|
|
// ifdef and __has_attribute on the same preprocessor line isn't portable.
|
|
#ifdef __has_attribute
|
|
# define DOUBLE_CONVERSION_HAS_ATTRIBUTE(x) __has_attribute(x)
|
|
#else
|