mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Implement new approach for debugging leaked wrapper object references (issue #2593)
This commit is contained in:
@ -9,10 +9,11 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=65071f8e223a9eb49fb5c3edb45124d18e91cc99$
|
||||
// $hash=76bc51ea624d90076f9be833ac96a4f84a46fd68$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/read_handler_cpptoc.h"
|
||||
#include "libcef_dll/shutdown_checker.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@ -22,6 +23,8 @@ size_t CEF_CALLBACK read_handler_read(struct _cef_read_handler_t* self,
|
||||
void* ptr,
|
||||
size_t size,
|
||||
size_t n) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -42,6 +45,8 @@ size_t CEF_CALLBACK read_handler_read(struct _cef_read_handler_t* self,
|
||||
int CEF_CALLBACK read_handler_seek(struct _cef_read_handler_t* self,
|
||||
int64 offset,
|
||||
int whence) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -56,6 +61,8 @@ int CEF_CALLBACK read_handler_seek(struct _cef_read_handler_t* self,
|
||||
}
|
||||
|
||||
int64 CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -70,6 +77,8 @@ int64 CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self) {
|
||||
}
|
||||
|
||||
int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -84,6 +93,8 @@ int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self) {
|
||||
}
|
||||
|
||||
int CEF_CALLBACK read_handler_may_block(struct _cef_read_handler_t* self) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -109,6 +120,12 @@ CefReadHandlerCppToC::CefReadHandlerCppToC() {
|
||||
GetStruct()->may_block = read_handler_may_block;
|
||||
}
|
||||
|
||||
// DESTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefReadHandlerCppToC::~CefReadHandlerCppToC() {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
}
|
||||
|
||||
template <>
|
||||
CefRefPtr<CefReadHandler>
|
||||
CefCppToCRefCounted<CefReadHandlerCppToC, CefReadHandler, cef_read_handler_t>::
|
||||
|
Reference in New Issue
Block a user