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

Unified Diff: base/logging.h

Issue 2676483002: Make CHECK int 3 on Windows, rather than crash (Closed)
Patch Set: Created 3 years, 11 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') | base/logging_unittest.cc » ('J')
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 5174e6d375540cd0f0bf355034c17812a66bf37b..e82f192d07bf48b401341cbe5f7d20170734dc55 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -463,6 +463,8 @@ class CheckOpResult {
// Crashes in the fastest, simplest possible way with no attempt at logging.
#if defined(COMPILER_GCC) || defined(__clang__)
#define IMMEDIATE_CRASH() __builtin_trap()
Will Harris 2017/02/02 01:21:06 I'm assuming clang doesn't support __debugbreak()
scottmg 2017/02/02 01:41:23 You mean clang-win? I guess it probably does. Done
+#elif defined(COMPILER_MSVC)
+#define IMMEDIATE_CRASH() __debugbreak()
#else
#define IMMEDIATE_CRASH() ((void)(*(volatile char*)0 = 0))
Will Harris 2017/02/02 01:21:06 when does this ever happen, do we support a compil
scottmg 2017/02/02 01:41:23 Shrug, OK, removed.
#endif
« no previous file with comments | « no previous file | base/logging_unittest.cc » ('j') | base/logging_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698