| Index: mojo/public/cpp/bindings/interface_ptr_set.h
|
| diff --git a/mojo/public/cpp/bindings/interface_ptr_set.h b/mojo/public/cpp/bindings/interface_ptr_set.h
|
| index 69fc8249cd40c3f6dc756792ea92a8b49ca2b6c4..d4b2046f5b1842157489bf02923625ac4dd7dfd8 100644
|
| --- a/mojo/public/cpp/bindings/interface_ptr_set.h
|
| +++ b/mojo/public/cpp/bindings/interface_ptr_set.h
|
| @@ -50,8 +50,9 @@ class PtrSet {
|
| public:
|
| explicit Element(Ptr<Interface> ptr)
|
| : ptr_(std::move(ptr)), weak_ptr_factory_(this) {
|
| - ptr_.set_connection_error_handler([this]() { delete this; });
|
| + ptr_.set_connection_error_handler(base::Bind(&DeleteElement, this));
|
| }
|
| +
|
| ~Element() {}
|
|
|
| void Close() { ptr_.reset(); }
|
| @@ -63,6 +64,8 @@ class PtrSet {
|
| }
|
|
|
| private:
|
| + static void DeleteElement(Element* element) { delete element; }
|
| +
|
| Ptr<Interface> ptr_;
|
| base::WeakPtrFactory<Element> weak_ptr_factory_;
|
|
|
|
|