Chromium Code Reviews| Index: base/logging.h |
| diff --git a/base/logging.h b/base/logging.h |
| index 5174e6d375540cd0f0bf355034c17812a66bf37b..7bb089c2b055c3ddb133974b43978967abeac4c2 100644 |
| --- a/base/logging.h |
| +++ b/base/logging.h |
| @@ -461,10 +461,12 @@ class CheckOpResult { |
| }; |
| // Crashes in the fastest, simplest possible way with no attempt at logging. |
| -#if defined(COMPILER_GCC) || defined(__clang__) |
|
Nico
2017/02/10 22:45:30
the || __clang__ was here to use __builtin_trap on
scottmg
2017/02/11 05:58:30
Done.
|
| +#if defined(COMPILER_GCC) || (defined(__clang__) && !defined(OS_WIN)) |
| #define IMMEDIATE_CRASH() __builtin_trap() |
| +#elif defined(COMPILER_MSVC) || (defined(__clang__) && defined(OS_WIN)) |
| +#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* |