Index: Source/wtf/RefCounted.h |
diff --git a/Source/wtf/RefCounted.h b/Source/wtf/RefCounted.h |
index 2e248d90d529d5a73b8cf925fc340e00d3c1a76e..823cc064d17ece4ddb0f6765492a63fc462470dd 100644 |
--- a/Source/wtf/RefCounted.h |
+++ b/Source/wtf/RefCounted.h |
@@ -21,17 +21,17 @@ |
#ifndef RefCounted_h |
#define RefCounted_h |
+#include "wtf/Assertions.h" |
#include "wtf/FastAllocBase.h" |
#include "wtf/InstanceCounter.h" |
#include "wtf/Noncopyable.h" |
#include "wtf/WTFExport.h" |
-#ifdef NDEBUG |
-#define CHECK_REF_COUNTED_LIFECYCLE 0 |
-#else |
+#if ENABLE(ASSERT) |
#define CHECK_REF_COUNTED_LIFECYCLE 1 |
-#include "wtf/Assertions.h" |
#include "wtf/ThreadRestrictionVerifier.h" |
+#else |
+#define CHECK_REF_COUNTED_LIFECYCLE 0 |
#endif |
namespace WTF { |
@@ -82,7 +82,7 @@ public: |
protected: |
RefCountedBase() |
: m_refCount(1) |
-#if SECURITY_ASSERT_ENABLED |
+#if ENABLE(SECURITY_ASSERT) |
, m_deletionHasBegun(false) |
#endif |
#if CHECK_REF_COUNTED_LIFECYCLE |
@@ -111,7 +111,7 @@ protected: |
ASSERT(m_refCount > 0); |
--m_refCount; |
if (!m_refCount) { |
-#if SECURITY_ASSERT_ENABLED |
+#if ENABLE(SECURITY_ASSERT) |
m_deletionHasBegun = true; |
#endif |
return true; |
@@ -135,12 +135,12 @@ protected: |
private: |
-#if CHECK_REF_COUNTED_LIFECYCLE || SECURITY_ASSERT_ENABLED |
+#if CHECK_REF_COUNTED_LIFECYCLE || ENABLE(SECURITY_ASSERT) |
friend void adopted(RefCountedBase*); |
#endif |
int m_refCount; |
-#if SECURITY_ASSERT_ENABLED |
+#if ENABLE(SECURITY_ASSERT) |
bool m_deletionHasBegun; |
#endif |
#if CHECK_REF_COUNTED_LIFECYCLE |
@@ -149,7 +149,7 @@ private: |
#endif |
}; |
-#if CHECK_REF_COUNTED_LIFECYCLE || SECURITY_ASSERT_ENABLED |
+#if CHECK_REF_COUNTED_LIFECYCLE || ENABLE(SECURITY_ASSERT) |
inline void adopted(RefCountedBase* object) |
{ |
if (!object) |