| Index: mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
|
| diff --git a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
|
| index ef3a1fe6800fe052d5f8bc15e04bea7c10a1a4fd..6019b4559130248ba7a05094e358dd76bb7b2487 100644
|
| --- a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
|
| +++ b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
|
| @@ -6,8 +6,6 @@
|
|
|
| #include <stdint.h>
|
|
|
| -#include <utility>
|
| -
|
| #include "base/bind.h"
|
| #include "base/location.h"
|
| #include "base/logging.h"
|
| @@ -309,16 +307,14 @@ void InterfaceEndpointClient::NotifyError(
|
|
|
| control_message_proxy_.OnConnectionError();
|
|
|
| - if (!error_handler_.is_null()) {
|
| - base::Closure error_handler = std::move(error_handler_);
|
| - error_handler.Run();
|
| - } else if (!error_with_reason_handler_.is_null()) {
|
| - ConnectionErrorWithReasonCallback error_with_reason_handler =
|
| - std::move(error_with_reason_handler_);
|
| + if (error_handler_) {
|
| + std::move(error_handler_).Run();
|
| + } else if (error_with_reason_handler_) {
|
| if (reason) {
|
| - error_with_reason_handler.Run(reason->custom_reason, reason->description);
|
| + std::move(error_with_reason_handler_)
|
| + .Run(reason->custom_reason, reason->description);
|
| } else {
|
| - error_with_reason_handler.Run(0, std::string());
|
| + std::move(error_with_reason_handler_).Run(0, std::string());
|
| }
|
| }
|
| }
|
|
|