mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Use DCHECK_IS_ON() instead of !NDEBUG for debug logic (issue #1961)
This commit is contained in:
@ -382,11 +382,11 @@ def make_cpptoc_function_impl_new(cls, name, func, defined_names):
|
||||
|
||||
if len(names) > 0:
|
||||
names = sorted(names)
|
||||
result += '\n#ifndef NDEBUG'\
|
||||
result += '\n#if DCHECK_IS_ON()'\
|
||||
'\n // Check that all wrapper objects have been destroyed'
|
||||
for name in names:
|
||||
result += '\n DCHECK(base::AtomicRefCountIsZero(&'+name+'::DebugObjCt));';
|
||||
result += '\n#endif // !NDEBUG'
|
||||
result += '\n#endif // DCHECK_IS_ON()'
|
||||
|
||||
if len(result) != result_len:
|
||||
result += '\n'
|
||||
@ -553,7 +553,7 @@ def make_cpptoc_class_impl(header, clsname, impl):
|
||||
' NOTREACHED() << "Unexpected class type: " << type;\n'+ \
|
||||
' return NULL;\n'+ \
|
||||
'}\n\n'+ \
|
||||
'#ifndef NDEBUG\n'+ \
|
||||
'#if DCHECK_IS_ON()\n'+ \
|
||||
'template<> base::AtomicRefCount '+parent_sig+'::DebugObjCt = 0;\n'+ \
|
||||
'#endif\n\n'+ \
|
||||
'template<> CefWrapperType '+parent_sig+'::kWrapperType = '+get_wrapper_type_enum(clsname)+';'
|
||||
|
Reference in New Issue
Block a user