diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-26 19:29:07 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-26 19:29:07 +0000 |
commit | 0d02a5f10d50dee16267a781ddb40aa2df47171f (patch) | |
tree | df0ca4439e611282ef4d2886f8b00aea87f7c8d5 /base/ref_counted.cc | |
parent | 33124014399f72fe1e780e7a9b12505d3a840b6b (diff) | |
download | chromium_src-0d02a5f10d50dee16267a781ddb40aa2df47171f.zip chromium_src-0d02a5f10d50dee16267a781ddb40aa2df47171f.tar.gz chromium_src-0d02a5f10d50dee16267a781ddb40aa2df47171f.tar.bz2 |
Add thread safety checks but keep them disabled for now until I fix all the current places where it triggers.
Fix thread_collision_warner for real this (third?) time.
Review URL: http://codereview.chromium.org/18569
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/ref_counted.cc')
-rw-r--r-- | base/ref_counted.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/ref_counted.cc b/base/ref_counted.cc index dfb3698..597c92c 100644 --- a/base/ref_counted.cc +++ b/base/ref_counted.cc @@ -5,6 +5,7 @@ #include "base/ref_counted.h" #include "base/logging.h" +#include "base/thread_collision_warner.h" namespace base { @@ -23,6 +24,9 @@ RefCountedBase::~RefCountedBase() { } void RefCountedBase::AddRef() { + // 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 @@ -30,6 +34,9 @@ void RefCountedBase::AddRef() { } bool RefCountedBase::Release() { + // 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 |