| Index: base/memory/weak_ptr.cc
|
| diff --git a/base/memory/weak_ptr.cc b/base/memory/weak_ptr.cc
|
| index a22f61aa2ba47e0a8417e40734a23353c96b2eb6..8ae4ec2e9fd42a8dd289e4f0a7daf7bf43797cf8 100644
|
| --- a/base/memory/weak_ptr.cc
|
| +++ b/base/memory/weak_ptr.cc
|
| @@ -11,20 +11,20 @@ WeakReference::Flag::Flag() : is_valid_(true) {
|
| // Flags only become bound when checked for validity, or invalidated,
|
| // so that we can check that later validity/invalidation operations on
|
| // the same Flag take place on the same thread.
|
| - thread_checker_.DetachFromThread();
|
| + sequence_checker_.DetachFromSequence();
|
| }
|
|
|
| void WeakReference::Flag::Invalidate() {
|
| // The flag being invalidated with a single ref implies that there are no
|
| // weak pointers in existence. Allow deletion on other thread in this case.
|
| - DCHECK(thread_checker_.CalledOnValidThread() || HasOneRef())
|
| - << "WeakPtrs must be checked and invalidated on the same thread.";
|
| + DCHECK(sequence_checker_.CalledOnValidSequence() || HasOneRef())
|
| + << "WeakPtrs must be checked and invalidated on the same sequence.";
|
| is_valid_ = false;
|
| }
|
|
|
| bool WeakReference::Flag::IsValid() const {
|
| - DCHECK(thread_checker_.CalledOnValidThread())
|
| - << "WeakPtrs must be checked and invalidated on the same thread.";
|
| + DCHECK(sequence_checker_.CalledOnValidSequence())
|
| + << "WeakPtrs must be checked and invalidated on the same sequence.";
|
| return is_valid_;
|
| }
|
|
|
|
|