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

Unified Diff: mojo/application/public/cpp/application_impl.h

Issue 1229553002: Mandoline: ConnectToApplication and ConnectToService should fail gracefully (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « components/view_manager/display_manager.cc ('k') | mojo/application/public/cpp/lib/application_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/public/cpp/application_impl.h
diff --git a/mojo/application/public/cpp/application_impl.h b/mojo/application/public/cpp/application_impl.h
index 8ab9aba4525b8210892715c75cb0ea99f56d4f5e..20b073359191a81e8cc5e047ab4c094ba832f5ff 100644
--- a/mojo/application/public/cpp/application_impl.h
+++ b/mojo/application/public/cpp/application_impl.h
@@ -92,7 +92,10 @@ class ApplicationImpl : public Application,
template <typename Interface>
void ConnectToService(mojo::URLRequestPtr request,
InterfacePtr<Interface>* ptr) {
- ConnectToApplication(request.Pass())->ConnectToService(ptr);
+ ApplicationConnection* connection = ConnectToApplication(request.Pass());
+ if (!connection)
+ return;
+ connection->ConnectToService(ptr);
}
// Application implementation.
« no previous file with comments | « components/view_manager/display_manager.cc ('k') | mojo/application/public/cpp/lib/application_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698