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

Unified Diff: mojo/public/cpp/application/lib/service_registry.cc

Issue 343473005: mojo: fail gracefully if ServiceRegistry can't find ServiceConnector (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweak test Created 6 years, 6 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/service_manager/service_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/application/lib/service_registry.cc
diff --git a/mojo/public/cpp/application/lib/service_registry.cc b/mojo/public/cpp/application/lib/service_registry.cc
index ea22ec4e5be62684ed0366a468325bc83cc4791e..bc901dfb9245ae967276e403ca1510d558f8c3cf 100644
--- a/mojo/public/cpp/application/lib/service_registry.cc
+++ b/mojo/public/cpp/application/lib/service_registry.cc
@@ -58,7 +58,9 @@ void ServiceRegistry::ConnectToService(const mojo::String& service_url,
const mojo::String& service_name,
ScopedMessagePipeHandle client_handle,
const mojo::String& requestor_url) {
- if (!application_->AllowIncomingConnection(service_name, requestor_url)) {
+ if (name_to_service_connector_.find(service_name) ==
+ name_to_service_connector_.end() ||
+ !application_->AllowIncomingConnection(service_name, requestor_url)) {
client_handle.reset();
return;
}
« no previous file with comments | « no previous file | mojo/service_manager/service_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698