Remove old approach for debugging leaked wrapper object references (issue #2593)

This commit is contained in:
Marshall Greenblatt
2019-01-23 17:10:23 +01:00
parent 3fe062a5b6
commit 6bfb5ab33b
292 changed files with 291 additions and 3095 deletions

View File

@ -420,27 +420,6 @@ def make_cpptoc_function_impl_new(cls, name, func, defined_names, base_scoped):
result += '\n'
result_len = len(result)
if is_cef_shutdown:
classes = func.parent.get_classes()
names = []
for tmpcls in classes:
if tmpcls.has_attrib('no_debugct_check'):
continue
if tmpcls.is_library_side():
names.append(tmpcls.get_name() + 'CppToC')
else:
names.append(tmpcls.get_name() + 'CToCpp')
if len(names) > 0:
names = sorted(names)
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 // DCHECK_IS_ON()'
if len(result) != result_len:
result += '\n'
result_len = len(result)
@ -672,10 +651,8 @@ def make_cpptoc_class_impl(header, clsname, impl):
' return NULL;\n'+ \
'}\n\n'
const += '#if DCHECK_IS_ON()\n'+ \
'template<> base::AtomicRefCount '+parent_sig+'::DebugObjCt ATOMIC_DECLARATION;\n'+ \
'#endif\n\n'+ \
'template<> CefWrapperType '+parent_sig+'::kWrapperType = '+get_wrapper_type_enum(clsname)+';'
const += 'template<> CefWrapperType ' + parent_sig + '::kWrapperType = ' + get_wrapper_type_enum(
clsname) + ';'
result += '\n\n' + const