Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: third_party/WebKit/Source/wtf/RefCounted.h

Issue 2624443003: Enable ThreadRestrictionVerifier for StringImpl (Closed)
Patch Set: minimal const peppering Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/RefCounted.h
diff --git a/third_party/WebKit/Source/wtf/RefCounted.h b/third_party/WebKit/Source/wtf/RefCounted.h
index 398db7bdb8f346b35b377913b5049d098a733e17..a4847efec651500b1c6776b8b3183b0ea5537421 100644
--- a/third_party/WebKit/Source/wtf/RefCounted.h
+++ b/third_party/WebKit/Source/wtf/RefCounted.h
@@ -43,7 +43,7 @@ class WTF_EXPORT RefCountedBase {
public:
void ref() const {
#if CHECK_REF_COUNTED_LIFECYCLE
- m_verifier.onRef(m_refCount);
+ SECURITY_DCHECK(m_verifier.onRef(m_refCount));
DCHECK(!m_adoptionIsRequired);
#endif
SECURITY_DCHECK(!m_deletionHasBegun);
@@ -53,14 +53,14 @@ class WTF_EXPORT RefCountedBase {
bool hasOneRef() const {
SECURITY_DCHECK(!m_deletionHasBegun);
#if CHECK_REF_COUNTED_LIFECYCLE
- m_verifier.checkSafeToUse();
+ SECURITY_DCHECK(m_verifier.isSafeToUse());
#endif
return m_refCount == 1;
}
int refCount() const {
#if CHECK_REF_COUNTED_LIFECYCLE
- m_verifier.checkSafeToUse();
+ SECURITY_DCHECK(m_verifier.isSafeToUse());
#endif
return m_refCount;
}
@@ -90,7 +90,7 @@ class WTF_EXPORT RefCountedBase {
bool derefBase() const {
SECURITY_DCHECK(!m_deletionHasBegun);
#if CHECK_REF_COUNTED_LIFECYCLE
- m_verifier.onDeref(m_refCount);
+ SECURITY_DCHECK(m_verifier.onDeref(m_refCount));
DCHECK(!m_adoptionIsRequired);
#endif

Powered by Google App Engine
This is Rietveld 408576698