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

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

Issue 2280003003: Clean up some assertion code in WebKit. (Closed)
Patch Set: Try to fix patchset deps again Created 4 years, 4 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 | « third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h ('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 c69fc6246e9a7f1e0abae58e3c879b330c3372fd..6fe194a44bc33f8ee0d0850b2ddf7e538a042b30 100644
--- a/third_party/WebKit/Source/wtf/Assertions.h
+++ b/third_party/WebKit/Source/wtf/Assertions.h
@@ -186,6 +186,8 @@ private:
#undef ASSERT
#endif
+#define DCHECK_AT(assertion, file, line) LAZY_STREAM(logging::LogMessage(file, line, #assertion).stream(), DCHECK_IS_ON() ? !(assertion) : false)
Stephen White 2016/08/27 23:20:21 Wouldn't this be clearer as #if DCHECK_IS_ON() #d
Wez 2016/08/28 01:11:36 The definition of DCHECK is specifically designed
+
#if ENABLE(ASSERT)
#define ASSERT(assertion) \
@@ -194,8 +196,6 @@ private:
CRASH()) : \
(void)0)
-#define DCHECK_AT(assertion, file, line) LAZY_STREAM(logging::LogMessage(file, line, #assertion).stream(), !(assertion))
-
#define ASSERT_NOT_REACHED() do { \
WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, 0); \
CRASH(); \
@@ -208,7 +208,6 @@ private:
#else
#define ASSERT(assertion) ((void)0)
-#define DCHECK_AT(assertion, file, line) EAT_STREAM_PARAMETERS
#define ASSERT_NOT_REACHED() ((void)0)
#define NO_RETURN_DUE_TO_ASSERT
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698