| Index: base/ref_counted.cc
|
| ===================================================================
|
| --- base/ref_counted.cc (revision 3911)
|
| +++ base/ref_counted.cc (working copy)
|
| @@ -5,6 +5,7 @@
|
| #include "base/ref_counted.h"
|
|
|
| #include "base/logging.h"
|
| +#include "base/thread_collision_warner.h"
|
|
|
| namespace base {
|
|
|
| @@ -23,6 +24,8 @@
|
| }
|
|
|
| void RefCountedBase::AddRef() {
|
| + // Current thread books the critical section "AddRelease" without release it
|
| + D_BOOK_CRITICAL_SECTION(add_release_);
|
| #ifndef NDEBUG
|
| DCHECK(!in_dtor_);
|
| #endif
|
| @@ -30,6 +33,8 @@
|
| }
|
|
|
| bool RefCountedBase::Release() {
|
| + // Current thread books the critical section "AddRelease" without release it
|
| + D_BOOK_CRITICAL_SECTION(add_release_);
|
| #ifndef NDEBUG
|
| DCHECK(!in_dtor_);
|
| #endif
|
|
|