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

Unified Diff: base/logging.h

Issue 1937613002: Stop compiling and printing logging strings for CHECK() on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android-check: . Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.h
diff --git a/base/logging.h b/base/logging.h
index e3f0cefaa073ea0571d60b3500879d1a9d93e963..36c9c6f311d1615b98c7507235e0bb41ec68e4b1 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -448,10 +448,10 @@ class CheckOpResult {
// We make sure CHECK et al. always evaluates their arguments, as
// doing CHECK(FunctionWithSideEffect()) is a common idiom.
-#if defined(OFFICIAL_BUILD) && defined(NDEBUG) && !defined(OS_ANDROID)
+#if defined(OFFICIAL_BUILD) && defined(NDEBUG)
// Make all CHECK functions discard their log strings to reduce code
-// bloat for official release builds (except Android).
+// bloat, and improve performance, for official release builds.
// TODO(akalin): This would be more valuable if there were some way to
// remove BreakDebugger() from the backtrace, perhaps by turning it
@@ -463,7 +463,7 @@ class CheckOpResult {
#define CHECK_OP(name, op, val1, val2) CHECK((val1) op (val2))
-#else
+#else // !(OFFICIAL_BUILD && NDEBUG)
#if defined(_PREFAST_) && defined(OS_WIN)
// Use __analysis_assume to tell the VC++ static analysis engine that
@@ -511,7 +511,7 @@ class CheckOpResult {
else \
logging::LogMessage(__FILE__, __LINE__, true_if_passed.message()).stream()
-#endif
+#endif // !(OFFICIAL_BUILD && NDEBUG)
// This formats a value for a failing CHECK_XX statement. Ordinarily,
// it uses the definition for operator<<, with a few special cases below.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698