Chromium Code Reviews| Index: base/memory/weak_ptr.h |
| diff --git a/base/memory/weak_ptr.h b/base/memory/weak_ptr.h |
| index 7006fb63e0981468e30ac2c631e8d6c1ed645ef7..21951982428555f2e777b6205704bcd10ac64f2c 100644 |
| --- a/base/memory/weak_ptr.h |
| +++ b/base/memory/weak_ptr.h |
| @@ -74,8 +74,8 @@ |
| #include "base/base_export.h" |
| #include "base/logging.h" |
| #include "base/memory/ref_counted.h" |
| +#include "base/sequence_checker.h" |
| #include "base/template_util.h" |
| -#include "base/threading/thread_checker.h" |
| namespace base { |
| @@ -97,14 +97,14 @@ class BASE_EXPORT WeakReference { |
| void Invalidate(); |
| bool IsValid() const; |
| - void DetachFromThread() { thread_checker_.DetachFromThread(); } |
| + void DetachFromThread(); |
| private: |
| friend class base::RefCountedThreadSafe<Flag>; |
| ~Flag(); |
| - ThreadChecker thread_checker_; |
| + SequenceChecker sequence_checker_; |
| bool is_valid_; |
| }; |
| @@ -245,6 +245,9 @@ class WeakPtr : public internal::WeakPtrBase { |
| T* ptr_; |
| }; |
| +// TODO(akalin): Make WeakPtrFactory and SupportsWeakPtr support |
|
jar (doing other things)
2013/02/16 02:37:27
nit: Can you add a bug number.
|
| +// binding to a SequencedTaskRunner instead of just a single thread. |
| + |
| // A class may extend from SupportsWeakPtr to expose weak pointers to itself. |
| // This is useful in cases where you want others to be able to get a weak |
| // pointer to your class. It also has the property that you don't need to |