Index: base/memory/ref_counted.h |
diff --git a/base/memory/ref_counted.h b/base/memory/ref_counted.h |
index e73951481be0e5501ae2bdc73c56502d3d51d7b9..1ebaa51ad42e6d4e08588d49e99200a1501b16ff 100644 |
--- a/base/memory/ref_counted.h |
+++ b/base/memory/ref_counted.h |
@@ -42,34 +42,10 @@ class BASE_EXPORT RefCountedBase { |
} |
- void AddRef() const { |
- // TODO(maruel): Add back once it doesn't assert 500 times/sec. |
- // Current thread books the critical section "AddRelease" |
- // without release it. |
- // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_); |
- #ifndef NDEBUG |
- DCHECK(!in_dtor_); |
- #endif |
- ++ref_count_; |
- } |
+ void AddRef() const; |
// Returns true if the object should self-delete. |
- bool Release() const { |
- // TODO(maruel): Add back once it doesn't assert 500 times/sec. |
- // Current thread books the critical section "AddRelease" |
- // without release it. |
- // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_); |
- #ifndef NDEBUG |
- DCHECK(!in_dtor_); |
- #endif |
- if (--ref_count_ == 0) { |
- #ifndef NDEBUG |
- in_dtor_ = true; |
- #endif |
- return true; |
- } |
- return false; |
- } |
+ bool Release() const; |
private: |
mutable int ref_count_; |