| Index: mojo/public/cpp/bindings/lib/router.cc
|
| diff --git a/mojo/public/cpp/bindings/lib/router.cc b/mojo/public/cpp/bindings/lib/router.cc
|
| index 756c459fa5b56ca846ad8320e37fedae22a013b7..7c610eeff571f0d3111d35ebaa3413e6908823c4 100644
|
| --- a/mojo/public/cpp/bindings/lib/router.cc
|
| +++ b/mojo/public/cpp/bindings/lib/router.cc
|
| @@ -246,6 +246,8 @@ void Router::HandleQueuedMessages() {
|
| }
|
|
|
| bool Router::HandleMessageInternal(Message* message) {
|
| + DCHECK(!encountered_error_);
|
| +
|
| if (message->has_flag(Message::kFlagExpectsResponse)) {
|
| if (!incoming_receiver_)
|
| return false;
|
| @@ -308,6 +310,11 @@ void Router::OnConnectionError() {
|
| }
|
|
|
| encountered_error_ = true;
|
| +
|
| + // The callbacks may hold on to resources. There is no need to keep them any
|
| + // longer.
|
| + async_responders_.clear();
|
| +
|
| if (!error_handler_.is_null())
|
| error_handler_.Run();
|
| }
|
|
|