Rename CefBase to CefBaseRefCounted (issue #2090)

This commit is contained in:
Marshall Greenblatt
2017-02-09 17:07:43 -05:00
parent 07ba48b082
commit 0afcb82ee6
679 changed files with 2066 additions and 1962 deletions

View File

@@ -47,7 +47,7 @@ extern "C" {
///
// All ref-counted framework structures must include this structure first.
///
typedef struct _cef_base_t {
typedef struct _cef_base_ref_counted_t {
///
// Size of the data structure.
///
@@ -57,20 +57,20 @@ typedef struct _cef_base_t {
// Called to increment the reference count for the object. Should be called
// for every new copy of a pointer to a given object.
///
void (CEF_CALLBACK *add_ref)(struct _cef_base_t* self);
void (CEF_CALLBACK *add_ref)(struct _cef_base_ref_counted_t* self);
///
// Called to decrement the reference count for the object. If the reference
// count falls to 0 the object should self-delete. Returns true (1) if the
// resulting reference count is 0.
///
int (CEF_CALLBACK *release)(struct _cef_base_t* self);
int (CEF_CALLBACK *release)(struct _cef_base_ref_counted_t* self);
///
// Returns true (1) if the current reference count is 1.
///
int (CEF_CALLBACK *has_one_ref)(struct _cef_base_t* self);
} cef_base_t;
int (CEF_CALLBACK *has_one_ref)(struct _cef_base_ref_counted_t* self);
} cef_base_ref_counted_t;
///
@@ -90,11 +90,11 @@ typedef struct _cef_base_scoped_t {
} cef_base_scoped_t;
// Check that the structure |s|, which is defined with a cef_base_t member named
// |base|, is large enough to contain the specified member |f|.
// Check that the structure |s|, which is defined with a size_t member at the
// top, is large enough to contain the specified member |f|.
#define CEF_MEMBER_EXISTS(s, f) \
((intptr_t)&((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= \
reinterpret_cast<cef_base_t*>(s)->size)
*reinterpret_cast<size_t*>(s))
#define CEF_MEMBER_MISSING(s, f) (!CEF_MEMBER_EXISTS(s, f) || !((s)->f))