Index: mojo/shell/context.cc |
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc |
index b4fe8297671d20e368151946a887f2aa4735f02d..3c5ee88fd04fea204ff3aab4e4999cb9b73ea41e 100644 |
--- a/mojo/shell/context.cc |
+++ b/mojo/shell/context.cc |
@@ -130,7 +130,7 @@ Context::Context() |
} |
} |
-Context::~Context() { |
+void Context::Shutdown() { |
// mojo_view_manager uses native_viewport. Destroy mojo_view_manager first so |
// that there aren't shutdown ordering issues. Once native viewport service is |
// moved into its own process this can likely be nuked. |
@@ -139,7 +139,14 @@ Context::~Context() { |
scoped_ptr<ServiceLoader>(), |
GURL("mojo:mojo_view_manager")); |
#endif |
+ service_manager_.SetLoaderForURL(scoped_ptr<ServiceLoader>(), |
+ GURL("mojo:profile_service")); |
service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); |
+ service_manager_.TerminateShellConnections(); |
+} |
+ |
+Context::~Context() { |
+ Shutdown(); |
} |
} // namespace shell |