Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1424)

Unified Diff: Source/wtf/Assertions.h

Issue 1207323004: Add __builtin_unreachable() to CRASH() when using Clang on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/wtf/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Assertions.h
diff --git a/Source/wtf/Assertions.h b/Source/wtf/Assertions.h
index 4ac87e79ab1cbfe3ae7c6a4c0be90475ff7b6f6a..d3b13a0c7e39bd01995d75908938210f58d1a887 100644
--- a/Source/wtf/Assertions.h
+++ b/Source/wtf/Assertions.h
@@ -143,11 +143,19 @@ using WTF::FrameToNameScope;
Signals are ignored by the crash reporter on OS X so we must do better.
*/
#ifndef CRASH
+#if COMPILER(MSVC)
+#if COMPILER(CLANG)
+#define CRASH() (__debugbreak(), __builtin_unreachable())
+#else
+#define CRASH() __debugbreak()
+#endif
+#else
#define CRASH() \
(WTFReportBacktrace(), \
(*(int*)0xfbadbeef = 0), \
IMMEDIATE_CRASH())
#endif
+#endif
#if COMPILER(CLANG)
#define NO_RETURN_DUE_TO_CRASH NO_RETURN
« no previous file with comments | « no previous file | Source/wtf/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698