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

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

Issue 2585673002: Replace ASSERT, ENABLE(ASSERT), and ASSERT_NOT_REACHED in wtf (Closed)
Patch Set: Fix an Asan issue with LinkedHashSetNodeBase::unlink Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/wtf/MathExtras.h ('k') | third_party/WebKit/Source/wtf/SizeLimits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8d23ce970af794e29f32cf01bc297ae5bb3f72ae..398db7bdb8f346b35b377913b5049d098a733e17 100644
--- a/third_party/WebKit/Source/wtf/RefCounted.h
+++ b/third_party/WebKit/Source/wtf/RefCounted.h
@@ -27,7 +27,7 @@
#include "wtf/Noncopyable.h"
#include "wtf/WTFExport.h"
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
#define CHECK_REF_COUNTED_LIFECYCLE 1
#include "wtf/ThreadRestrictionVerifier.h"
#else
@@ -44,7 +44,7 @@ class WTF_EXPORT RefCountedBase {
void ref() const {
#if CHECK_REF_COUNTED_LIFECYCLE
m_verifier.onRef(m_refCount);
- ASSERT(!m_adoptionIsRequired);
+ DCHECK(!m_adoptionIsRequired);
#endif
SECURITY_DCHECK(!m_deletionHasBegun);
++m_refCount;
@@ -82,7 +82,7 @@ class WTF_EXPORT RefCountedBase {
~RefCountedBase() {
SECURITY_DCHECK(m_deletionHasBegun);
#if CHECK_REF_COUNTED_LIFECYCLE
- ASSERT(!m_adoptionIsRequired);
+ DCHECK(!m_adoptionIsRequired);
#endif
}
@@ -91,10 +91,10 @@ class WTF_EXPORT RefCountedBase {
SECURITY_DCHECK(!m_deletionHasBegun);
#if CHECK_REF_COUNTED_LIFECYCLE
m_verifier.onDeref(m_refCount);
- ASSERT(!m_adoptionIsRequired);
+ DCHECK(!m_adoptionIsRequired);
#endif
- ASSERT(m_refCount > 0);
+ DCHECK_GT(m_refCount, 0);
--m_refCount;
if (!m_refCount) {
#if ENABLE(SECURITY_ASSERT)
« no previous file with comments | « third_party/WebKit/Source/wtf/MathExtras.h ('k') | third_party/WebKit/Source/wtf/SizeLimits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698