| Index: base/bind_helpers.h
|
| diff --git a/base/bind_helpers.h b/base/bind_helpers.h
|
| index 73fd81ea87692954443d5a0856632f65155dbdb6..e4b4a174dcba980af63b664f52a8df5ff98d87d0 100644
|
| --- a/base/bind_helpers.h
|
| +++ b/base/bind_helpers.h
|
| @@ -52,6 +52,7 @@
|
| #pragma once
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "base/template_util.h"
|
|
|
| namespace base {
|
| @@ -215,7 +216,7 @@ const T& Unwrap(ConstRefWrapper<T> const_ref) {
|
|
|
| // Utility for handling different refcounting semantics in the Bind()
|
| // function.
|
| -template <typename ref, typename T>
|
| +template <typename IsMethod, typename T>
|
| struct MaybeRefcount;
|
|
|
| template <typename T>
|
| @@ -248,6 +249,12 @@ struct MaybeRefcount<base::true_type, const T*> {
|
| static void Release(const T* o) { o->Release(); }
|
| };
|
|
|
| +template <typename T>
|
| +struct MaybeRefcount<base::true_type, WeakPtr<T> > {
|
| + static void AddRef(const WeakPtr<T>&) {}
|
| + static void Release(const WeakPtr<T>&) {}
|
| +};
|
| +
|
| } // namespace internal
|
|
|
| template <typename T>
|
|
|