Use DCHECK_IS_ON() instead of !NDEBUG for debug logic (issue #1961)

This commit is contained in:
Marshall Greenblatt
2016-09-01 14:24:30 +03:00
parent ad1619dbd7
commit 5068b50b48
278 changed files with 320 additions and 525 deletions

View File

@ -89,7 +89,7 @@ class CefCppToC : public CefBase {
}
bool HasOneRef() const { return UnderlyingHasOneRef(); }
#ifndef NDEBUG
#if DCHECK_IS_ON()
// Simple tracking of allocated objects.
static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int)
#endif
@ -106,13 +106,13 @@ class CefCppToC : public CefBase {
base->release = struct_release;
base->has_one_ref = struct_has_one_ref;
#ifndef NDEBUG
#if DCHECK_IS_ON()
base::AtomicRefCountInc(&DebugObjCt);
#endif
}
virtual ~CefCppToC() {
#ifndef NDEBUG
#if DCHECK_IS_ON()
base::AtomicRefCountDec(&DebugObjCt);
#endif
}