| Index: mojo/shell/public/cpp/lib/application_runner.cc
|
| diff --git a/mojo/shell/public/cpp/lib/application_runner.cc b/mojo/shell/public/cpp/lib/application_runner.cc
|
| index de4bfe9639ae47fab8696124f9a3b9bf33c7f975..3a358608c2a5b759f4e4ef65cc52d699fd3623a9 100644
|
| --- a/mojo/shell/public/cpp/lib/application_runner.cc
|
| +++ b/mojo/shell/public/cpp/lib/application_runner.cc
|
| @@ -54,10 +54,10 @@ MojoResult ApplicationRunner::Run(MojoHandle shell_client_request_handle,
|
| else
|
| loop.reset(new base::MessageLoop(message_loop_type_));
|
|
|
| - ShellConnection impl(client_.get(),
|
| - MakeRequest<shell::mojom::ShellClient>(
|
| - MakeScopedHandle(MessagePipeHandle(
|
| - shell_client_request_handle))));
|
| + connection_.reset(new ShellConnection(
|
| + client_.get(),
|
| + MakeRequest<shell::mojom::ShellClient>(MakeScopedHandle(
|
| + MessagePipeHandle(shell_client_request_handle)))));
|
| loop->Run();
|
| // It's very common for the client to cache the app and terminate on errors.
|
| // If we don't delete the client before the app we run the risk of the
|
| @@ -67,6 +67,7 @@ MojoResult ApplicationRunner::Run(MojoHandle shell_client_request_handle,
|
| // client.
|
| loop.reset();
|
| client_.reset();
|
| + connection_.reset();
|
| }
|
| return MOJO_RESULT_OK;
|
| }
|
| @@ -80,4 +81,8 @@ MojoResult ApplicationRunner::Run(MojoHandle shell_client_request_handle) {
|
| return Run(shell_client_request_handle, init_base);
|
| }
|
|
|
| +void ApplicationRunner::DestroyShellConnection() {
|
| + connection_.reset();
|
| +}
|
| +
|
| } // namespace mojo
|
|
|