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,15 +9,18 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=a4c54b863e3e144dc9a3cfa2911c5f842c84247c$
|
||||
// $hash=c5faaf475b1cf107d5b7df2e976ff29607401549$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/image_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
|
||||
#include "libcef_dll/shutdown_checker.h"
|
||||
|
||||
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
CEF_EXPORT cef_image_t* cef_image_create() {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
@ -32,6 +35,8 @@ namespace {
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK image_is_empty(struct _cef_image_t* self) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -47,6 +52,8 @@ int CEF_CALLBACK image_is_empty(struct _cef_image_t* self) {
|
||||
|
||||
int CEF_CALLBACK image_is_same(struct _cef_image_t* self,
|
||||
struct _cef_image_t* that) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -73,6 +80,8 @@ int CEF_CALLBACK image_add_bitmap(struct _cef_image_t* self,
|
||||
cef_alpha_type_t alpha_type,
|
||||
const void* pixel_data,
|
||||
size_t pixel_data_size) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -96,6 +105,8 @@ int CEF_CALLBACK image_add_png(struct _cef_image_t* self,
|
||||
float scale_factor,
|
||||
const void* png_data,
|
||||
size_t png_data_size) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -118,6 +129,8 @@ int CEF_CALLBACK image_add_jpeg(struct _cef_image_t* self,
|
||||
float scale_factor,
|
||||
const void* jpeg_data,
|
||||
size_t jpeg_data_size) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -137,6 +150,8 @@ int CEF_CALLBACK image_add_jpeg(struct _cef_image_t* self,
|
||||
}
|
||||
|
||||
size_t CEF_CALLBACK image_get_width(struct _cef_image_t* self) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -151,6 +166,8 @@ size_t CEF_CALLBACK image_get_width(struct _cef_image_t* self) {
|
||||
}
|
||||
|
||||
size_t CEF_CALLBACK image_get_height(struct _cef_image_t* self) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -166,6 +183,8 @@ size_t CEF_CALLBACK image_get_height(struct _cef_image_t* self) {
|
||||
|
||||
int CEF_CALLBACK image_has_representation(struct _cef_image_t* self,
|
||||
float scale_factor) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -181,6 +200,8 @@ int CEF_CALLBACK image_has_representation(struct _cef_image_t* self,
|
||||
|
||||
int CEF_CALLBACK image_remove_representation(struct _cef_image_t* self,
|
||||
float scale_factor) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -199,6 +220,8 @@ int CEF_CALLBACK image_get_representation_info(struct _cef_image_t* self,
|
||||
float* actual_scale_factor,
|
||||
int* pixel_width,
|
||||
int* pixel_height) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -249,6 +272,8 @@ image_get_as_bitmap(struct _cef_image_t* self,
|
||||
cef_alpha_type_t alpha_type,
|
||||
int* pixel_width,
|
||||
int* pixel_height) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -289,6 +314,8 @@ image_get_as_png(struct _cef_image_t* self,
|
||||
int with_transparency,
|
||||
int* pixel_width,
|
||||
int* pixel_height) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -330,6 +357,8 @@ image_get_as_jpeg(struct _cef_image_t* self,
|
||||
int quality,
|
||||
int* pixel_width,
|
||||
int* pixel_height) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -384,6 +413,12 @@ CefImageCppToC::CefImageCppToC() {
|
||||
GetStruct()->get_as_jpeg = image_get_as_jpeg;
|
||||
}
|
||||
|
||||
// DESTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefImageCppToC::~CefImageCppToC() {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
}
|
||||
|
||||
template <>
|
||||
CefRefPtr<CefImage>
|
||||
CefCppToCRefCounted<CefImageCppToC, CefImage, cef_image_t>::UnwrapDerived(
|
||||
|
Reference in New Issue
Block a user