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

Unified Diff: webrtc/api/statstypes.cc

Issue 2384693002: Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere (Closed)
Patch Set: !!! Created 4 years, 3 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 | « webrtc/api/statscollector.cc ('k') | webrtc/base/buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/statstypes.cc
diff --git a/webrtc/api/statstypes.cc b/webrtc/api/statstypes.cc
index eb6b30cca61cd76b92b3034997e364fb09b9cec7..339d5bbaf7fe12040a56d98cdf819c36ad13f7ab 100644
--- a/webrtc/api/statstypes.cc
+++ b/webrtc/api/statstypes.cc
@@ -276,7 +276,7 @@ bool StatsReport::Value::Equals(const Value& other) const {
case kFloat:
return value_.float_ == other.value_.float_;
case kStaticString: {
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
+#if RTC_DCHECK_IS_ON
if (value_.static_string_ != other.value_.static_string_) {
RTC_DCHECK(strcmp(value_.static_string_, other.value_.static_string_) !=
0)
@@ -306,7 +306,7 @@ bool StatsReport::Value::operator==(const char* value) const {
return value_.string_->compare(value) == 0;
if (type_ != kStaticString)
return false;
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
+#if RTC_DCHECK_IS_ON
if (value_.static_string_ != value)
RTC_DCHECK(strcmp(value_.static_string_, value) != 0)
<< "Duplicate global?";
« no previous file with comments | « webrtc/api/statscollector.cc ('k') | webrtc/base/buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698