Index: mojo/runner/context.cc |
diff --git a/mojo/runner/context.cc b/mojo/runner/context.cc |
index 3e47f6cf746da1405b2a9d18ae84237087a0a55d..db00a7d7df5f1a596ceab5e8dbc8319bef5f065c 100644 |
--- a/mojo/runner/context.cc |
+++ b/mojo/runner/context.cc |
@@ -287,7 +287,9 @@ void Context::Shutdown() { |
TRACE_EVENT0("mojo_shell", "Context::Shutdown"); |
DCHECK_EQ(base::MessageLoop::current()->task_runner(), |
task_runners_->shell_runner()); |
- embedder::ShutdownIPCSupport(); |
+ // Post a task in case OnShutdownComplete is called synchronously. |
+ base::MessageLoop::current()->PostTask( |
+ FROM_HERE, base::Bind(embedder::ShutdownIPCSupport)); |
// We'll quit when we get OnShutdownComplete(). |
base::MessageLoop::current()->Run(); |
} |