| Index: base/threading/thread.cc
|
| diff --git a/base/threading/thread.cc b/base/threading/thread.cc
|
| index 98610a63c09875878ffceca6417d7af16980ca89..7dae79b4c4d2fd81b4349a642fbfa0733a4bb363 100644
|
| --- a/base/threading/thread.cc
|
| +++ b/base/threading/thread.cc
|
| @@ -95,17 +95,11 @@ bool Thread::StartWithOptions(const Options& options) {
|
| message_loop_ = message_loop_owned.get();
|
| start_event_.Reset();
|
|
|
| - // Hold |thread_lock_| while starting the new thread to synchronize with
|
| - // Stop() while it's not guaranteed to be sequenced (until crbug/629139 is
|
| - // fixed).
|
| - {
|
| - AutoLock lock(thread_lock_);
|
| - if (!PlatformThread::CreateWithPriority(options.stack_size, this, &thread_,
|
| - options.priority)) {
|
| - DLOG(ERROR) << "failed to create thread";
|
| - message_loop_ = nullptr;
|
| - return false;
|
| - }
|
| + if (!PlatformThread::CreateWithPriority(options.stack_size, this, &thread_,
|
| + options.priority)) {
|
| + DLOG(ERROR) << "failed to create thread";
|
| + message_loop_ = nullptr;
|
| + return false;
|
| }
|
|
|
| // The ownership of |message_loop_| is managed by the newly created thread
|
| @@ -135,11 +129,7 @@ bool Thread::WaitUntilThreadStarted() const {
|
| }
|
|
|
| void Thread::Stop() {
|
| - // TODO(gab): Fix improper usage of this API (http://crbug.com/629139) and
|
| - // enable this check, until then synchronization with Start() via
|
| - // |thread_lock_| is required...
|
| - // DCHECK(owning_sequence_checker_.CalledOnValidSequencedThread());
|
| - AutoLock lock(thread_lock_);
|
| + DCHECK(owning_sequence_checker_.CalledOnValidSequencedThread());
|
|
|
| if (thread_.is_null())
|
| return;
|
| @@ -162,9 +152,7 @@ void Thread::Stop() {
|
| }
|
|
|
| void Thread::StopSoon() {
|
| - // TODO(gab): Fix improper usage of this API (http://crbug.com/629139) and
|
| - // enable this check.
|
| - // DCHECK(owning_sequence_checker_.CalledOnValidSequencedThread());
|
| + DCHECK(owning_sequence_checker_.CalledOnValidSequencedThread());
|
|
|
| if (stopping_ || !message_loop_)
|
| return;
|
|
|