Index: base/memory/weak_ptr.cc |
diff --git a/base/memory/weak_ptr.cc b/base/memory/weak_ptr.cc |
index a22f61aa2ba47e0a8417e40734a23353c96b2eb6..d4ec1446e4e3858396866fc71bdfed7e7e1dc6bf 100644 |
--- a/base/memory/weak_ptr.cc |
+++ b/base/memory/weak_ptr.cc |
@@ -10,21 +10,21 @@ namespace internal { |
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(); |
+ // the same Flag take place on the same sequenced thread. |
+ 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(HasOneRef() || sequence_checker_.CalledOnValidSequencedThread()) |
tommycli
2013/07/25 15:57:09
Changing the order of the conditionals also coinci
akalin
2013/07/25 19:36:38
I'm a bit wary about changing the order here. The
tommycli
2013/07/25 19:54:59
Done. Sounds good.
On 2013/07/25 19:36:38, akalin
|
+ << "WeakPtrs must be invalidated on the same sequenced thread."; |
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_.CalledOnValidSequencedThread()) |
+ << "WeakPtrs must be checked on the same sequenced thread."; |
return is_valid_; |
} |