mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 887465 - Rewrite double-conversion's assertions in terms of the MOZ_* assertions, and keep wtf (Yarr) from redefining them. r=jwalden
--HG-- extra : rebase_source : 3cdadf85f6bc471f065d570cb03d2441886d3738
This commit is contained in:
parent
d622fa5cdc
commit
63aac72328
@ -37,7 +37,9 @@
|
|||||||
# define ASSERT_DISABLED 1
|
# define ASSERT_DISABLED 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef ASSERT
|
||||||
#define ASSERT(assertion) MOZ_ASSERT(assertion)
|
#define ASSERT(assertion) MOZ_ASSERT(assertion)
|
||||||
|
#endif
|
||||||
#define ASSERT_UNUSED(variable, assertion) do { \
|
#define ASSERT_UNUSED(variable, assertion) do { \
|
||||||
(void)variable; \
|
(void)variable; \
|
||||||
ASSERT(assertion); \
|
ASSERT(assertion); \
|
||||||
|
@ -18,3 +18,4 @@ cp $1/src/*.cc ./
|
|||||||
|
|
||||||
patch -p3 < add-mfbt-api-markers.patch
|
patch -p3 < add-mfbt-api-markers.patch
|
||||||
patch -p3 < use-StandardInteger.patch
|
patch -p3 < use-StandardInteger.patch
|
||||||
|
patch -p3 < use-mozilla-assertions.patch
|
||||||
|
23
mfbt/double-conversion/use-mozilla-assertions.patch
Normal file
23
mfbt/double-conversion/use-mozilla-assertions.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
|
||||||
|
--- a/mfbt/double-conversion/utils.h
|
||||||
|
+++ b/mfbt/double-conversion/utils.h
|
||||||
|
@@ -31,15 +31,15 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
-#include <assert.h>
|
||||||
|
+#include "mozilla/Assertions.h"
|
||||||
|
#ifndef ASSERT
|
||||||
|
-#define ASSERT(condition) (assert(condition))
|
||||||
|
+#define ASSERT(condition) MOZ_ASSERT(condition)
|
||||||
|
#endif
|
||||||
|
#ifndef UNIMPLEMENTED
|
||||||
|
-#define UNIMPLEMENTED() (abort())
|
||||||
|
+#define UNIMPLEMENTED() MOZ_CRASH()
|
||||||
|
#endif
|
||||||
|
#ifndef UNREACHABLE
|
||||||
|
-#define UNREACHABLE() (abort())
|
||||||
|
+#define UNREACHABLE() MOZ_CRASH()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Double operations detection based on target architecture.
|
@ -31,15 +31,15 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include "mozilla/Assertions.h"
|
||||||
#ifndef ASSERT
|
#ifndef ASSERT
|
||||||
#define ASSERT(condition) (assert(condition))
|
#define ASSERT(condition) MOZ_ASSERT(condition)
|
||||||
#endif
|
#endif
|
||||||
#ifndef UNIMPLEMENTED
|
#ifndef UNIMPLEMENTED
|
||||||
#define UNIMPLEMENTED() (abort())
|
#define UNIMPLEMENTED() MOZ_CRASH()
|
||||||
#endif
|
#endif
|
||||||
#ifndef UNREACHABLE
|
#ifndef UNREACHABLE
|
||||||
#define UNREACHABLE() (abort())
|
#define UNREACHABLE() MOZ_CRASH()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Double operations detection based on target architecture.
|
// Double operations detection based on target architecture.
|
||||||
|
Loading…
Reference in New Issue
Block a user