| Index: base/threading/simple_thread.cc
|
| diff --git a/base/threading/simple_thread.cc b/base/threading/simple_thread.cc
|
| index fa1a3449e057e2176244b092ab9b20b4ef88ba8e..0a0665631a2b14341ea277280fe6a46834d4253f 100644
|
| --- a/base/threading/simple_thread.cc
|
| +++ b/base/threading/simple_thread.cc
|
| @@ -23,9 +23,10 @@ SimpleThread::SimpleThread(const std::string& name_prefix,
|
| WaitableEvent::InitialState::NOT_SIGNALED) {}
|
|
|
| SimpleThread::~SimpleThread() {
|
| + DCHECK(options_.joinable) << "A non-joinable thread must be leaked.";
|
| DCHECK(HasBeenStarted()) << "SimpleThread was never started.";
|
| - DCHECK(thread_.is_null()) << "Joinable SimpleThread destroyed without being "
|
| - << "Join()ed.";
|
| + DCHECK(HasBeenJoined()) << "Joinable SimpleThread destroyed without being "
|
| + << "Join()ed.";
|
| }
|
|
|
| void SimpleThread::Start() {
|
| @@ -41,9 +42,9 @@ void SimpleThread::Start() {
|
| }
|
|
|
| void SimpleThread::Join() {
|
| + DCHECK(options_.joinable) << "A non-joinable thread can't be joined.";
|
| DCHECK(HasBeenStarted()) << "Tried to Join a never-started thread.";
|
| DCHECK(!HasBeenJoined()) << "Tried to Join a thread multiple times.";
|
| - DCHECK(!thread_.is_null()) << "A non-joinable thread can't be joined.";
|
| PlatformThread::Join(thread_);
|
| thread_ = PlatformThreadHandle();
|
| joined_ = true;
|
|
|