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

Unified Diff: third_party/WebKit/Source/wtf/Assertions.h

Issue 1884023002: Implement Dump-on-DCHECK (via alternate DCHECK and DCHECK_OP macro implementations). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« base/logging.h ('K') | « build/config/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Assertions.h
diff --git a/third_party/WebKit/Source/wtf/Assertions.h b/third_party/WebKit/Source/wtf/Assertions.h
index a6917d62b85b8b8074dd6ce5b85d61a7c405da8a..d609fa394c7042c6308490fbf9be6cd949007e9b 100644
--- a/third_party/WebKit/Source/wtf/Assertions.h
+++ b/third_party/WebKit/Source/wtf/Assertions.h
@@ -51,12 +51,14 @@
// Users must test "#if ENABLE(ASSERT)", which helps ensure that code
// testing this macro has included this header.
#ifndef ENABLE_ASSERT
-#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
+#if DCHECK_IS_ON() && !defined(DCHECK_IS_DUMP_WITHOUT_CRASH)
+/* ASSERT* will currently crash the process if enabled, so which is not
+ the desired behaviour if DCHECK_IS_DUMP_WITHOUT_CRASH. */
+#define ENABLE_ASSERT 1
+#else
/* Disable ASSERT* macros in release mode by default. */
#define ENABLE_ASSERT 0
-#else
-#define ENABLE_ASSERT 1
-#endif /* defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) */
+#endif /* DCHECK_IS_ON() */
#endif
#ifndef ASSERT_MSG_DISABLED
« base/logging.h ('K') | « build/config/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698