summaryrefslogtreecommitdiffstats
path: root/base/logging.h
diff options
context:
space:
mode:
authornsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 20:59:01 +0000
committernsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 20:59:01 +0000
commit20960e074cf789825155f771e1c035df41cd0e75 (patch)
tree560b967c07210bda790dbeebf6174e3e971b5eb7 /base/logging.h
parentc4f7571e88637185eb79e598bd3b6301490a2255 (diff)
downloadchromium_src-20960e074cf789825155f771e1c035df41cd0e75.zip
chromium_src-20960e074cf789825155f771e1c035df41cd0e75.tar.gz
chromium_src-20960e074cf789825155f771e1c035df41cd0e75.tar.bz2
Add a gyp flag to enable dcheck by default in release without
having the pass a flag. This will be used on the try bots. BUG=96753 Review URL: http://codereview.chromium.org/7719007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102017 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.h')
-rw-r--r--base/logging.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/base/logging.h b/base/logging.h
index c18fada..d418315 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -619,16 +619,29 @@ enum { DEBUG_MODE = ENABLE_DLOG };
#if defined(NDEBUG)
+BASE_EXPORT extern DcheckState g_dcheck_state;
+
+#if defined(DCHECK_ALWAYS_ON)
+
+#define DCHECK_IS_ON() true
+#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
+ COMPACT_GOOGLE_LOG_EX_FATAL(ClassName , ##__VA_ARGS__)
+#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_FATAL
+const LogSeverity LOG_DCHECK = LOG_FATAL;
+
+#else
+
#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
COMPACT_GOOGLE_LOG_EX_ERROR_REPORT(ClassName , ##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_ERROR_REPORT
const LogSeverity LOG_DCHECK = LOG_ERROR_REPORT;
-BASE_EXPORT extern DcheckState g_dcheck_state;
#define DCHECK_IS_ON() \
((::logging::g_dcheck_state == \
::logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS) && \
LOG_IS_ON(DCHECK))
+#endif // defined(DCHECK_ALWAYS_ON)
+
#else // defined(NDEBUG)
// On a regular debug build, we want to have DCHECKs enabled.