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

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

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: m_domTreeVersion initialization 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
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 5904187a0edcdce13d2eca73177f41d6029ecfcb..392b24d8881aeb93f89cf69727cba73b6de52c96 100644
--- a/third_party/WebKit/Source/wtf/Assertions.h
+++ b/third_party/WebKit/Source/wtf/Assertions.h
@@ -46,14 +46,8 @@
#include <windows.h>
#endif
-// Users must test "#if ENABLE(ASSERT)", which helps ensure that code
-// testing this macro has included this header.
-#ifndef ENABLE_ASSERT
-#define ENABLE_ASSERT DCHECK_IS_ON()
-#endif
-
#ifndef LOG_DISABLED
-#define LOG_DISABLED !ENABLE(ASSERT)
+#define LOG_DISABLED !DCHECK_IS_ON()
#endif
// These helper functions are always declared, but not necessarily always
@@ -152,7 +146,7 @@ class WTF_EXPORT ScopedLogger {
LAZY_STREAM(logging::LogMessage(file, line, #assertion).stream(), \
DCHECK_IS_ON() ? !(assertion) : false)
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
#define ASSERT(assertion) DCHECK(assertion)
#define ASSERT_NOT_REACHED() NOTREACHED()
#else
@@ -162,7 +156,7 @@ class WTF_EXPORT ScopedLogger {
// Users must test "#if ENABLE(SECURITY_ASSERT)", which helps ensure
// that code testing this macro has included this header.
-#if defined(ADDRESS_SANITIZER) || ENABLE(ASSERT)
+#if defined(ADDRESS_SANITIZER) || DCHECK_IS_ON()
#define ENABLE_SECURITY_ASSERT 1
#else
#define ENABLE_SECURITY_ASSERT 0
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/KURL.cpp ('k') | third_party/WebKit/Source/wtf/AssertionsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698