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

Unified Diff: Source/wtf/Assertions.h

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 | « Source/web/WebScopedMicrotaskSuppression.cpp ('k') | Source/wtf/DefaultAllocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Assertions.h
diff --git a/Source/wtf/Assertions.h b/Source/wtf/Assertions.h
index d4b281ab636389883abad7ea34a03b0551f35bbe..04eaa6e657b2c4e204f1290604c66442df8326b6 100644
--- a/Source/wtf/Assertions.h
+++ b/Source/wtf/Assertions.h
@@ -43,22 +43,19 @@
#include "wtf/Compiler.h"
#include "wtf/WTFExport.h"
+// Users must test "#if ENABLE(ASSERT)", which helps ensure that code
+// testing this macro has included this header.
+#ifndef ENABLE_ASSERT
#ifdef NDEBUG
-/* Disable ASSERT* macros in release mode. */
-#define ASSERTIONS_DISABLED_DEFAULT 1
+/* Disable ASSERT* macros in release mode by default. */
+#define ENABLE_ASSERT 0
#else
-#define ASSERTIONS_DISABLED_DEFAULT 0
+#define ENABLE_ASSERT 1
+#endif /* NDEBUG */
#endif
#ifndef BACKTRACE_DISABLED
-#define BACKTRACE_DISABLED ASSERTIONS_DISABLED_DEFAULT
-#endif
-
-// Users must test "#if ENABLE(ASSERT)", which helps ensure that code
-// testing this macro has included this header.
-#ifndef ENABLE_ASSERT
-// Notice the not below:
-#define ENABLE_ASSERT !ASSERTIONS_DISABLED_DEFAULT
+#define BACKTRACE_DISABLED !ENABLE(ASSERT)
#endif
#ifndef ASSERT_MSG_DISABLED
« no previous file with comments | « Source/web/WebScopedMicrotaskSuppression.cpp ('k') | Source/wtf/DefaultAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698