mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Remove old approach for debugging leaked wrapper object references (issue #2593)
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user