diff --git a/include/cef_base.h b/include/cef_base.h index bd8f11ed4..03221d111 100644 --- a/include/cef_base.h +++ b/include/cef_base.h @@ -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}; };