Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: mash/shell/shell_application_delegate.cc

Issue 1675603002: [mojo-edk] Simplify multiprocess pipe bootstrap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix some callers to work with sync APIs Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/edk/embedder/embedder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/shell/shell_application_delegate.cc
diff --git a/mash/shell/shell_application_delegate.cc b/mash/shell/shell_application_delegate.cc
index 68c01fd6807ab5092cfd18a893e91dae2e32e801..4c2196e6e99068d286b42c9d180f07508e56aa1f 100644
--- a/mash/shell/shell_application_delegate.cc
+++ b/mash/shell/shell_application_delegate.cc
@@ -117,8 +117,12 @@ void ShellApplicationDelegate::StartRestartableService(
// TODO(beng): This would be the place to insert logic that counted restarts
// to avoid infinite crash-restart loops.
scoped_ptr<mojo::Connection> connection = shell_->Connect(url);
- connection->SetRemoteServiceProviderConnectionErrorHandler(restart_callback);
- connections_[url] = std::move(connection);
+ // Note: |connection| may be null if we've lost our connection to the shell.
+ if (connection) {
+ connection->SetRemoteServiceProviderConnectionErrorHandler(
+ restart_callback);
+ connections_[url] = std::move(connection);
+ }
}
} // namespace shell
« no previous file with comments | « no previous file | mojo/edk/embedder/embedder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698