Index: components/mus/public/cpp/lib/window_tree_client.cc |
diff --git a/components/mus/public/cpp/lib/window_tree_client.cc b/components/mus/public/cpp/lib/window_tree_client.cc |
index 5ed5eaec5c8d40b160d3158bacb485012b64075c..e7b22888feeb3c6c83dab5ca69b437f939929ae9 100644 |
--- a/components/mus/public/cpp/lib/window_tree_client.cc |
+++ b/components/mus/public/cpp/lib/window_tree_client.cc |
@@ -28,6 +28,8 @@ |
namespace mus { |
+void DeleteWindowTreeClient(WindowTreeClient* client) { delete client; } |
+ |
Id MakeTransportId(ClientSpecificId client_id, ClientSpecificId local_id) { |
return (client_id << 16) | local_id; |
} |
@@ -644,7 +646,8 @@ void WindowTreeClient::OnEmbed(ClientSpecificId client_id, |
bool drawn) { |
DCHECK(!tree_ptr_); |
tree_ptr_ = std::move(tree); |
- tree_ptr_.set_connection_error_handler([this]() { delete this; }); |
+ tree_ptr_.set_connection_error_handler( |
+ base::Bind(&DeleteWindowTreeClient, this)); |
if (window_manager_delegate_) { |
tree_ptr_->GetWindowManagerClient(GetProxy(&window_manager_internal_client_, |