| 36 | } |
| 37 | |
| 38 | bool RefCountedBase::Release() const { |
| 39 | // TODO(maruel): Add back once it doesn't assert 500 times/sec. |
| 40 | // Current thread books the critical section "AddRelease" without release it. |
| 41 | // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_); |
| 42 | #ifndef NDEBUG |
| 43 | DCHECK(!in_dtor_); |
| 44 | #endif |
| 45 | if (--ref_count_ == 0) { |
| 46 | #ifndef NDEBUG |
| 47 | in_dtor_ = true; |
| 48 | #endif |
| 49 | return true; |
| 50 | } |
| 51 | return false; |
| 52 | } |
| 53 | |
| 54 | bool RefCountedThreadSafeBase::HasOneRef() const { |
| 55 | return base::RefCountIsOne( |
nothing calls this directly
no test coverage detected