Title: [219248] trunk/Source/WTF
- Revision
- 219248
- Author
- [email protected]
- Date
- 2017-07-06 23:08:02 -0700 (Thu, 06 Jul 2017)
Log Message
Unreviewed, Windows build fix after r219233 part 3
https://bugs.webkit.org/show_bug.cgi?id=174231
* wtf/Assertions.h:
(compilerFenceForCrash):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (219247 => 219248)
--- trunk/Source/WTF/ChangeLog 2017-07-07 06:04:02 UTC (rev 219247)
+++ trunk/Source/WTF/ChangeLog 2017-07-07 06:08:02 UTC (rev 219248)
@@ -1,5 +1,13 @@
2017-07-06 Yusuke Suzuki <[email protected]>
+ Unreviewed, Windows build fix after r219233 part 3
+ https://bugs.webkit.org/show_bug.cgi?id=174231
+
+ * wtf/Assertions.h:
+ (compilerFenceForCrash):
+
+2017-07-06 Yusuke Suzuki <[email protected]>
+
Unreviewed, Windows build fix after r219233 part 2
https://bugs.webkit.org/show_bug.cgi?id=174231
Modified: trunk/Source/WTF/wtf/Assertions.h (219247 => 219248)
--- trunk/Source/WTF/wtf/Assertions.h 2017-07-07 06:04:02 UTC (rev 219247)
+++ trunk/Source/WTF/wtf/Assertions.h 2017-07-07 06:08:02 UTC (rev 219248)
@@ -53,7 +53,6 @@
#ifdef __cplusplus
#include <type_traits>
-#include <wtf/Atomics.h>
#endif
#ifdef NDEBUG
@@ -493,6 +492,15 @@
}
}
+inline void compilerFenceForCrash()
+{
+#if OS(WINDOWS) && !COMPILER(GCC_OR_CLANG)
+ _ReadWriteBarrier();
+#else
+ asm volatile("" ::: "memory");
+#endif
+}
+
#ifndef CRASH_WITH_SECURITY_IMPLICATION_AND_INFO
// This is useful if you are going to stuff data into registers before crashing. Like the crashWithInfo functions below...
// GCC doesn't like the ##__VA_ARGS__ here since this macro is called from another macro so we just CRASH instead there.
@@ -499,7 +507,7 @@
#if COMPILER(CLANG) || COMPILER(MSVC)
#define CRASH_WITH_SECURITY_IMPLICATION_AND_INFO(...) do { \
WTF::isIntegralType(__VA_ARGS__); \
- compilerFence(); \
+ compilerFenceForCrash(); \
WTFCrashWithInfo(__LINE__, __FILE__, WTF_PRETTY_FUNCTION, __COUNTER__, ##__VA_ARGS__); \
} while (false)
#else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes