Add CefRefCount::SubtleRefCountForDebug
Helper for debugging refcount-related issues.
This commit is contained in:
parent
b974438cfc
commit
66105a5417
|
@ -116,6 +116,14 @@ class CefRefCount {
|
||||||
///
|
///
|
||||||
bool HasAtLeastOneRef() const { return !ref_count_.IsZero(); }
|
bool HasAtLeastOneRef() const { return !ref_count_.IsZero(); }
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns the current reference count (with no barriers). This is subtle,
|
||||||
|
/// and should be used only for debugging.
|
||||||
|
///
|
||||||
|
int SubtleRefCountForDebug() const {
|
||||||
|
return ref_count_.SubtleRefCountForDebug();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable base::AtomicRefCount ref_count_{0};
|
mutable base::AtomicRefCount ref_count_{0};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue