Index: Source/wtf/RefCounted.h |
diff --git a/Source/wtf/RefCounted.h b/Source/wtf/RefCounted.h |
index cdbf81f8ed81b82eff0412d30a600329593c646b..662ae55cb4e9cd398bf42f6c4ac971acd87ed7ab 100644 |
--- a/Source/wtf/RefCounted.h |
+++ b/Source/wtf/RefCounted.h |
@@ -118,14 +118,14 @@ protected: |
#endif |
ASSERT(m_refCount > 0); |
- if (m_refCount == 1) { |
+ --m_refCount; |
+ if (!m_refCount) { |
#if SECURITY_ASSERT_ENABLED |
m_deletionHasBegun = true; |
#endif |
return true; |
} |
- --m_refCount; |
#if CHECK_REF_COUNTED_LIFECYCLE |
// Stop thread verification when the ref goes to 1 because it |
// is safe to be passed to another thread at this point. |