Commit 6bfb5ab3 authored by Marshall Greenblatt's avatar Marshall Greenblatt
Browse files

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

parent 3fe062a5
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=5524afc164e5f8baf765fa91e5064105dd34b212$
// $hash=236a2f5e705cde035d9d87a8a6045dccd258a2d0$
//
#include "libcef_dll/cpptoc/accessibility_handler_cpptoc.h"
......@@ -88,14 +88,6 @@ CefRefPtr<CefAccessibilityHandler> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<
CefAccessibilityHandlerCppToC,
CefAccessibilityHandler,
cef_accessibility_handler_t>::DebugObjCt ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefAccessibilityHandlerCppToC,
CefAccessibilityHandler,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7a1d9167c083721572cedc99f89ace69364abca8$
// $hash=afc09ddf708d525254959882f8ecb9190190c8c2$
//
#include "libcef_dll/cpptoc/app_cpptoc.h"
......@@ -138,13 +138,6 @@ CefCppToCRefCounted<CefAppCppToC, CefApp, cef_app_t>::UnwrapDerived(
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount
CefCppToCRefCounted<CefAppCppToC, CefApp, cef_app_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType
CefCppToCRefCounted<CefAppCppToC, CefApp, cef_app_t>::kWrapperType = WT_APP;
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=103cb371ed4b96f94928587d464f1c5b459ca24c$
// $hash=cb7cf1cb27059ab4ebf7e1f81b3eee1b34d279f8$
//
#include "libcef_dll/cpptoc/auth_callback_cpptoc.h"
......@@ -74,14 +74,6 @@ CefRefPtr<CefAuthCallback> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefAuthCallbackCppToC,
CefAuthCallback,
cef_auth_callback_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefAuthCallbackCppToC,
CefAuthCallback,
......
......@@ -16,14 +16,6 @@ CefRefPtr<CefBaseRefCounted> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefBaseRefCountedCppToC,
CefBaseRefCounted,
cef_base_ref_counted_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefBaseRefCountedCppToC,
CefBaseRefCounted,
......
......@@ -22,13 +22,6 @@ CefCppToCScoped<CefBaseScopedCppToC, CefBaseScoped, cef_base_scoped_t>::
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount
CefCppToCScoped<CefBaseScopedCppToC, CefBaseScoped, cef_base_scoped_t>::
DebugObjCt ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCScoped<CefBaseScopedCppToC,
CefBaseScoped,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=65ff24a6eea2a6f55773a4e8117fd56ecb8d5d8a$
// $hash=22e45d32fa0eb2e697feb5331ef8ed5f2d6864b5$
//
#include "libcef_dll/cpptoc/before_download_callback_cpptoc.h"
......@@ -61,14 +61,6 @@ CefCppToCRefCounted<CefBeforeDownloadCallbackCppToC,
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<
CefBeforeDownloadCallbackCppToC,
CefBeforeDownloadCallback,
cef_before_download_callback_t>::DebugObjCt ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType
CefCppToCRefCounted<CefBeforeDownloadCallbackCppToC,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1a09058e8a846ec1ecb223d7883d44e6d36600f1$
// $hash=bfd709c1b6abba557eaa0775293fbcb3b7fd674f$
//
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
......@@ -200,14 +200,6 @@ CefCppToCRefCounted<CefBinaryValueCppToC, CefBinaryValue, cef_binary_value_t>::
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefBinaryValueCppToC,
CefBinaryValue,
cef_binary_value_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefBinaryValueCppToC,
CefBinaryValue,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d670b45c86f780e4113755c97679cafe089680fb$
// $hash=97f834d04878d403755dd16060a55dd53a6c7b1a$
//
#include "libcef_dll/cpptoc/browser_cpptoc.h"
......@@ -441,13 +441,6 @@ CefCppToCRefCounted<CefBrowserCppToC, CefBrowser, cef_browser_t>::UnwrapDerived(
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount
CefCppToCRefCounted<CefBrowserCppToC, CefBrowser, cef_browser_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefBrowserCppToC,
CefBrowser,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=40639710b864280e2288d7532309f327c92f2216$
// $hash=1a1e9d55adac010523c7c8fdd2de03d9d081ba85$
//
#include "libcef_dll/cpptoc/browser_host_cpptoc.h"
......@@ -1288,14 +1288,6 @@ CefCppToCRefCounted<CefBrowserHostCppToC, CefBrowserHost, cef_browser_host_t>::
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefBrowserHostCppToC,
CefBrowserHost,
cef_browser_host_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefBrowserHostCppToC,
CefBrowserHost,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=90d9d5420cb532a187a78fba2a29dc9e2933b114$
// $hash=978ea00f17d5dc1053ce83f9077b04d5e37bc1f8$
//
#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h"
......@@ -131,14 +131,6 @@ CefRefPtr<CefBrowserProcessHandler> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<
CefBrowserProcessHandlerCppToC,
CefBrowserProcessHandler,
cef_browser_process_handler_t>::DebugObjCt ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType
CefCppToCRefCounted<CefBrowserProcessHandlerCppToC,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=6703175d02d6a1fbbbe931ebc000081e037fb507$
// $hash=cace3871b8faad929d11cc34a85b9a4e431d3173$
//
#include "libcef_dll/cpptoc/callback_cpptoc.h"
......@@ -68,13 +68,6 @@ CefCppToCRefCounted<CefCallbackCppToC, CefCallback, cef_callback_t>::
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount
CefCppToCRefCounted<CefCallbackCppToC, CefCallback, cef_callback_t>::
DebugObjCt ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefCallbackCppToC,
CefCallback,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ddbd026586c4d4cac686b8e046891d1d4363549b$
// $hash=0471e5598bd81ceae0416d644bcfed875005a4f8$
//
#include "libcef_dll/cpptoc/client_cpptoc.h"
......@@ -303,13 +303,6 @@ CefCppToCRefCounted<CefClientCppToC, CefClient, cef_client_t>::UnwrapDerived(
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount
CefCppToCRefCounted<CefClientCppToC, CefClient, cef_client_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefClientCppToC, CefClient, cef_client_t>::
kWrapperType = WT_CLIENT;
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=745c869d4a8bb07633e5aff8a313a642503bd84f$
// $hash=2eec49f4f266de3ab29041d1140b213bd3dd564d$
//
#include "libcef_dll/cpptoc/command_line_cpptoc.h"
......@@ -425,14 +425,6 @@ CefCppToCRefCounted<CefCommandLineCppToC, CefCommandLine, cef_command_line_t>::
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefCommandLineCppToC,
CefCommandLine,
cef_command_line_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefCommandLineCppToC,
CefCommandLine,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=e483812d8e14d27960b8b3ab2d4d8e9968c0bc5b$
// $hash=9cdeea47297901ed9863ee2c80400a5e94e40612$
//
#include "libcef_dll/cpptoc/completion_callback_cpptoc.h"
......@@ -57,14 +57,6 @@ CefRefPtr<CefCompletionCallback> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefCompletionCallbackCppToC,
CefCompletionCallback,
cef_completion_callback_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefCompletionCallbackCppToC,
CefCompletionCallback,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=e37ed0bb1da97f687f27b923ef1c3f9f3a5d2e21$
// $hash=b840f4ff3504ccc605d74312fc0ad124dfa3abd6$
//
#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h"
......@@ -197,14 +197,6 @@ CefRefPtr<CefContextMenuHandler> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefContextMenuHandlerCppToC,
CefContextMenuHandler,
cef_context_menu_handler_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefContextMenuHandlerCppToC,
CefContextMenuHandler,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=b87f239858f915302b4922cb145021520e7ec6bc$
// $hash=27b88b4dd80a97e09e9ac1f9fde71dd10fa938f0$
//
#include "libcef_dll/cpptoc/context_menu_params_cpptoc.h"
......@@ -448,14 +448,6 @@ CefRefPtr<CefContextMenuParams> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefContextMenuParamsCppToC,
CefContextMenuParams,
cef_context_menu_params_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefContextMenuParamsCppToC,
CefContextMenuParams,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=208b31bc64dd9d47ac6272304bce2dab1686f071$
// $hash=229d455bfe9f7c8536f7bc03734eaf29e9e637b1$
//
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
......@@ -260,14 +260,6 @@ CefRefPtr<CefCookieManager> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefCookieManagerCppToC,
CefCookieManager,
cef_cookie_manager_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefCookieManagerCppToC,
CefCookieManager,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=393d7d0a8816b40c26ee5fd8fb4d50664d606131$
// $hash=b32f1d7c13f178735b3364d8cfe32881d4132b8e$
//
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
......@@ -83,14 +83,6 @@ CefRefPtr<CefCookieVisitor> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefCookieVisitorCppToC,
CefCookieVisitor,
cef_cookie_visitor_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefCookieVisitorCppToC,
CefCookieVisitor,
......
......@@ -6,7 +6,6 @@
#define CEF_LIBCEF_DLL_CPPTOC_CPPTOC_REF_COUNTED_H_
#pragma once
#include "include/base/cef_atomic_ref_count.h"
#include "include/base/cef_logging.h"
#include "include/base/cef_macros.h"
#include "include/capi/cef_base_capi.h"
......@@ -91,11 +90,6 @@ class CefCppToCRefCounted : public CefBaseRefCounted {
bool HasOneRef() const { return UnderlyingHasOneRef(); }
bool HasAtLeastOneRef() const { return UnderlyingHasAtLeastOneRef(); }
#if DCHECK_IS_ON()
// Simple tracking of allocated objects.
static base::AtomicRefCount DebugObjCt;
#endif
protected:
CefCppToCRefCounted() {
wrapper_struct_.type_ = kWrapperType;
......@@ -109,17 +103,9 @@ class CefCppToCRefCounted : public CefBaseRefCounted {
base->release = struct_release;
base->has_one_ref = struct_has_one_ref;
base->has_at_least_one_ref = struct_has_at_least_one_ref;
#if DCHECK_IS_ON()
base::AtomicRefCountInc(&DebugObjCt);
#endif
}
virtual ~CefCppToCRefCounted() {
#if DCHECK_IS_ON()
base::AtomicRefCountDec(&DebugObjCt);
#endif
}
virtual ~CefCppToCRefCounted() {}
private:
// Used to associate this wrapper object, the underlying object instance and
......
......@@ -154,30 +154,17 @@ class CefCppToCScoped : public CefBaseScoped {
// call UnderlyingRelease() on the wrapping CefCToCpp object.
StructName* GetStruct() { return &wrapper_struct_.struct_; }
#if DCHECK_IS_ON()
// Simple tracking of allocated objects.
static base::AtomicRefCount DebugObjCt;
#endif
protected:
CefCppToCScoped() {
wrapper_struct_.type_ = kWrapperType;
wrapper_struct_.wrapper_ = this;
memset(GetStruct(), 0, sizeof(StructName));
#if DCHECK_IS_ON()
base::AtomicRefCountInc(&DebugObjCt);
#endif
}
virtual ~CefCppToCScoped() {
// Only delete the underlying object if we own it.
if (owned_ && wrapper_struct_.object_)
delete wrapper_struct_.object_;
#if DCHECK_IS_ON()
base::AtomicRefCountDec(&DebugObjCt);
#endif
}
private:
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=0c57a2898a260d61342066e6e923d2ae60007680$
// $hash=0b3b80f715c561227e286098b88b8dbe2acc84a1$
//
#include "libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h"
......@@ -59,14 +59,6 @@ CefRefPtr<CefDeleteCookiesCallback> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<
CefDeleteCookiesCallbackCppToC,
CefDeleteCookiesCallback,
cef_delete_cookies_callback_t>::DebugObjCt ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType
CefCppToCRefCounted<CefDeleteCookiesCallbackCppToC,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c9420b059e61e810cde99f46f1f162450c5e83c5$
// $hash=76ce77c2503ece27838b7b83d3e5644d76a48a2d$
//
#include "libcef_dll/cpptoc/dialog_handler_cpptoc.h"
......@@ -90,14 +90,6 @@ CefRefPtr<CefDialogHandler> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefDialogHandlerCppToC,
CefDialogHandler,
cef_dialog_handler_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefDialogHandlerCppToC,
CefDialogHandler,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=5d4ac15bce882a74bb53fb52c0203475d596a2f7$
// $hash=73518b40945d0751d55c53334d7b73682fde8964$
//
#include "libcef_dll/cpptoc/dictionary_value_cpptoc.h"
......@@ -740,14 +740,6 @@ CefRefPtr<CefDictionaryValue> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefDictionaryValueCppToC,
CefDictionaryValue,
cef_dictionary_value_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefDictionaryValueCppToC,
CefDictionaryValue,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=350b86d1f5e2912141666328a21b2d4498424cca$
// $hash=0668a14276f9304b318a8048860e4d4427816402$
//
#include "libcef_dll/cpptoc/display_handler_cpptoc.h"
......@@ -286,14 +286,6 @@ CefRefPtr<CefDisplayHandler> CefCppToCRefCounted<
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefDisplayHandlerCppToC,
CefDisplayHandler,
cef_display_handler_t>::DebugObjCt
ATOMIC_DECLARATION;
#endif
template <>
CefWrapperType CefCppToCRefCounted<CefDisplayHandlerCppToC,
CefDisplayHandler,
......
......@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=b3574eb0dc0a5e5debb7428d24b799dac3a5bf9f$
// $hash=1134173c737c8888b3f29817ae5999a2e3c31646$
//
#include "libcef_dll/cpptoc/domdocument_cpptoc.h"
......@@ -307,14 +307,6 @@ CefCppToCRefCounted<CefDOMDocumentCppToC, CefDOMDocument, cef_domdocument_t>::
return NULL;
}
#if DCHECK_IS_ON()
template <>
base::AtomicRefCount CefCppToCRefCounted<CefDOMDocumentCppToC,
CefDOMDocument,
cef_domdocument_t>::DebugObjCt
ATOMIC_DECLARATION;