| Index: mojo/embedder/embedder.cc
|
| diff --git a/mojo/embedder/embedder.cc b/mojo/embedder/embedder.cc
|
| index 674e7c205073565d53748956f5321622f85ecffe..a9f70c5ef09cc70dd270baccccf1f407a9ccf5ee 100644
|
| --- a/mojo/embedder/embedder.cc
|
| +++ b/mojo/embedder/embedder.cc
|
| @@ -173,10 +173,21 @@ void DestroyChannel(ChannelInfo* channel_info) {
|
| DCHECK(channel_info);
|
| DCHECK(channel_info->io_thread_task_runner);
|
|
|
| + if (!channel_info->channel) {
|
| + // Presumably, |Init()| on the channel failed.
|
| + return;
|
| + }
|
| +
|
| + channel_info->channel->WillShutdownSoon();
|
| channel_info->io_thread_task_runner->PostTask(
|
| FROM_HERE, base::Bind(&DestroyChannelOnIOThread, channel_info));
|
| }
|
|
|
| +void WillDestroyChannelSoon(ChannelInfo* channel_info) {
|
| + DCHECK(channel_info);
|
| + channel_info->channel->WillShutdownSoon();
|
| +}
|
| +
|
| MojoResult CreatePlatformHandleWrapper(
|
| ScopedPlatformHandle platform_handle,
|
| MojoHandle* platform_handle_wrapper_handle) {
|
|
|