summaryrefslogtreecommitdiffstats
path: root/base/logging.h
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-26 07:55:21 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-26 07:55:21 +0000
commit7c67fbeab3bf5bf4df0fc1ddb25e58bf735c36d5 (patch)
tree34c56e5b6e316e8b955a20cfb276b9e81e751a75 /base/logging.h
parent2cfa1f1f2058a73b0a1778dd562ba6ed39e40f92 (diff)
downloadchromium_src-7c67fbeab3bf5bf4df0fc1ddb25e58bf735c36d5.zip
chromium_src-7c67fbeab3bf5bf4df0fc1ddb25e58bf735c36d5.tar.gz
chromium_src-7c67fbeab3bf5bf4df0fc1ddb25e58bf735c36d5.tar.bz2
Log an error in release builds when NOTREACHED is hit in ChromiumOS builds. This data can be collected on ChromiumOS when the user consents to it; this should help us collect more data about what shouldn't be happening in prod that happens anyways.
BUG=288014 Review URL: https://codereview.chromium.org/24313004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.h')
-rw-r--r--base/logging.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/logging.h b/base/logging.h
index 859f260..71f391f 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -776,7 +776,12 @@ const LogSeverity LOG_DCHECK = LOG_INFO;
#define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2)
#define DCHECK_GT(val1, val2) DCHECK_OP(GT, > , val1, val2)
+#if defined(NDEBUG) && defined(OS_CHROMEOS)
+#define NOTREACHED() LOG(ERROR) << "NOTREACHED() hit in " << \
+ __FUNCTION__ << ". "
+#else
#define NOTREACHED() DCHECK(false)
+#endif
// Redefine the standard assert to use our nice log files
#undef assert