mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 70.0.3516.0 (#581409)
This commit is contained in:
@@ -59,6 +59,7 @@ namespace cef_subtle {
|
||||
class RefCountedBase {
|
||||
public:
|
||||
bool HasOneRef() const { return ref_count_ == 1; }
|
||||
bool HasAtLeastOneRef() const { return ref_count_ >= 1; }
|
||||
|
||||
protected:
|
||||
RefCountedBase()
|
||||
@@ -109,6 +110,7 @@ class RefCountedBase {
|
||||
class RefCountedThreadSafeBase {
|
||||
public:
|
||||
bool HasOneRef() const;
|
||||
bool HasAtLeastOneRef() const;
|
||||
|
||||
protected:
|
||||
RefCountedThreadSafeBase();
|
||||
|
@@ -69,6 +69,11 @@ typedef struct _cef_base_ref_counted_t {
|
||||
// Returns true (1) if the current reference count is 1.
|
||||
///
|
||||
int(CEF_CALLBACK* has_one_ref)(struct _cef_base_ref_counted_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the current reference count is at least 1.
|
||||
///
|
||||
int(CEF_CALLBACK* has_at_least_one_ref)(struct _cef_base_ref_counted_t* self);
|
||||
} cef_base_ref_counted_t;
|
||||
|
||||
///
|
||||
|
@@ -68,6 +68,11 @@ class CefBaseRefCounted {
|
||||
///
|
||||
virtual bool HasOneRef() const = 0;
|
||||
|
||||
///
|
||||
// Returns true if the reference count is at least 1.
|
||||
///
|
||||
virtual bool HasAtLeastOneRef() const = 0;
|
||||
|
||||
protected:
|
||||
virtual ~CefBaseRefCounted() {}
|
||||
};
|
||||
@@ -102,6 +107,13 @@ class CefRefCount {
|
||||
///
|
||||
bool HasOneRef() const { return base::AtomicRefCountIsOne(&ref_count_); }
|
||||
|
||||
///
|
||||
// Returns true if the reference count is at least 1.
|
||||
///
|
||||
bool HasAtLeastOneRef() const {
|
||||
return !base::AtomicRefCountIsZero(&ref_count_);
|
||||
}
|
||||
|
||||
private:
|
||||
mutable base::AtomicRefCount ref_count_;
|
||||
DISALLOW_COPY_AND_ASSIGN(CefRefCount);
|
||||
@@ -122,6 +134,9 @@ class CefRefCount {
|
||||
return false; \
|
||||
} \
|
||||
bool HasOneRef() const OVERRIDE { return ref_count_.HasOneRef(); } \
|
||||
bool HasAtLeastOneRef() const OVERRIDE { \
|
||||
return ref_count_.HasAtLeastOneRef(); \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
CefRefCount ref_count_;
|
||||
|
Reference in New Issue
Block a user