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

Unified Diff: Source/wtf/RefCounted.h

Issue 214453005: RefCounted::derefBase() should do the decrement from 1 to 0 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698