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

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: Rebase on cleanups 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 | « build/config/dcheck_always_on.gni ('k') | third_party/WebKit/Source/wtf/AssertionsTest.cpp » ('j') | 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 4f9b24e207fa15ac027127735d79f10fbdd3ae06..f1f1004a851b26879660f1e320ea04e922ef5239 100644
--- a/third_party/WebKit/Source/wtf/Assertions.h
+++ b/third_party/WebKit/Source/wtf/Assertions.h
@@ -134,9 +134,17 @@ class WTF_EXPORT ScopedLogger {
#undef ASSERT
#endif
-#define DCHECK_AT(assertion, file, line) \
- LAZY_STREAM(logging::LogMessage(file, line, #assertion).stream(), \
+#if defined(DCHECK_IS_DUMP_WITHOUT_CRASH)
+// In dump-on-DCHECK builds there is no log message, but |file| and |line must
+// still be referenced, so log them; the dump-on-DCHECK impl will not actually
+// log them.
+// See crbug.com/596231.
+#define DCHECK_AT(assertion, file, line) DCHECK(assertion) << file << line
+#else
+#define DCHECK_AT(assertion, file, line) \
+ LAZY_STREAM(logging::LogMessage(file, line, logging::LOG_DCHECK).stream(), \
DCHECK_IS_ON() ? !(assertion) : false)
+#endif
#if DCHECK_IS_ON()
#define ASSERT(assertion) DCHECK(assertion)
« no previous file with comments | « build/config/dcheck_always_on.gni ('k') | third_party/WebKit/Source/wtf/AssertionsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698