| Index: mojo/common/weak_interface_ptr_set.h
|
| diff --git a/mojo/common/weak_interface_ptr_set.h b/mojo/common/weak_interface_ptr_set.h
|
| index e423b932296bfc212e9e35b9e1b84e041d55cac5..3a73640b3602804c24cb613cd2ea7c4d21d14cf0 100644
|
| --- a/mojo/common/weak_interface_ptr_set.h
|
| +++ b/mojo/common/weak_interface_ptr_set.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_
|
| #define MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_
|
|
|
| +#include <utility>
|
| #include <vector>
|
|
|
| #include "base/memory/weak_ptr.h"
|
| @@ -22,7 +23,7 @@ class WeakInterfacePtrSet {
|
| ~WeakInterfacePtrSet() { CloseAll(); }
|
|
|
| void AddInterfacePtr(InterfacePtr<Interface> ptr) {
|
| - auto weak_interface_ptr = new WeakInterfacePtr<Interface>(ptr.Pass());
|
| + auto weak_interface_ptr = new WeakInterfacePtr<Interface>(std::move(ptr));
|
| ptrs_.push_back(weak_interface_ptr->GetWeakPtr());
|
| ClearNullInterfacePtrs();
|
| }
|
| @@ -60,7 +61,7 @@ template <typename Interface>
|
| class WeakInterfacePtr {
|
| public:
|
| explicit WeakInterfacePtr(InterfacePtr<Interface> ptr)
|
| - : ptr_(ptr.Pass()), weak_ptr_factory_(this) {
|
| + : ptr_(std::move(ptr)), weak_ptr_factory_(this) {
|
| ptr_.set_connection_error_handler([this]() { delete this; });
|
| }
|
| ~WeakInterfacePtr() {}
|
|
|