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

Unified Diff: base/logging.h

Issue 2676483002: Make CHECK int 3 on Windows, rather than crash (Closed)
Patch Set: no need to special case #if for clang Created 3 years, 10 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 | base/logging_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.h
diff --git a/base/logging.h b/base/logging.h
index c0ebaf92bd3da3da67fa467cea0399542790debd..92f1753bb1af15d9c0ff68b42c1a97909254273c 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -497,10 +497,12 @@ class CheckOpResult {
};
// Crashes in the fastest, simplest possible way with no attempt at logging.
-#if defined(COMPILER_GCC) || defined(__clang__)
+#if defined(COMPILER_GCC)
#define IMMEDIATE_CRASH() __builtin_trap()
+#elif defined(COMPILER_MSVC)
+#define IMMEDIATE_CRASH() __debugbreak()
#else
-#define IMMEDIATE_CRASH() ((void)(*(volatile char*)0 = 0))
+#error Port
#endif
// CHECK dies with a fatal error if condition is not true. It is *not*
« no previous file with comments | « no previous file | base/logging_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698