Add CefRefCount::SubtleRefCountForDebug

Helper for debugging refcount-related issues.
This commit is contained in:
Marshall Greenblatt 2024-10-12 14:10:40 -04:00
parent b974438cfc
commit 66105a5417
1 changed files with 8 additions and 0 deletions

View File

@ -116,6 +116,14 @@ class CefRefCount {
///
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:
mutable base::AtomicRefCount ref_count_{0};
};