| Index: third_party/mojo/src/mojo/edk/system/channel.cc
|
| diff --git a/third_party/mojo/src/mojo/edk/system/channel.cc b/third_party/mojo/src/mojo/edk/system/channel.cc
|
| index 263f40b1473155c719fd773d689113d08ab023f7..1b46721ace2ce724b43e8c72f6798daf64b46cd8 100644
|
| --- a/third_party/mojo/src/mojo/edk/system/channel.cc
|
| +++ b/third_party/mojo/src/mojo/edk/system/channel.cc
|
| @@ -69,6 +69,10 @@ void Channel::Shutdown() {
|
| // |OnReadMessage()| or |OnError()|.
|
| raw_channel_->Shutdown();
|
| is_running_ = false;
|
| + // |WillShutdownSoon()| may not have been called (i.e. on a channel error),
|
| + // and this flag is relied on to prevent a race with
|
| + // |AttachAndRunEndpoint()|.
|
| + is_shutting_down_ = true;
|
|
|
| // We need to deal with it outside the lock.
|
| std::swap(to_destroy, local_id_to_endpoint_map_);
|
|
|