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

Unified Diff: services/view_manager/view_manager_app.cc

Issue 989553002: Fix crash in ViewManager: fail gracefully when no ServiceProvider is (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/view_manager/view_manager_app.cc
diff --git a/services/view_manager/view_manager_app.cc b/services/view_manager/view_manager_app.cc
index ec55f589971d55d4bb3b4ae0c2f09476726bce59..715d1b8b7578b0028c8e26d7660ce792ee94ac40 100644
--- a/services/view_manager/view_manager_app.cc
+++ b/services/view_manager/view_manager_app.cc
@@ -45,6 +45,9 @@ bool ViewManagerApp::ConfigureIncomingConnection(
connection->AddService<ViewManagerService>(this);
connection->AddService<WindowManagerInternalClient>(this);
connection->ConnectToService(&wm_internal_);
+ // If no ServiceProvider has been sent, refuse the connection.
sky 2015/03/06 18:25:28 This doesn't make sense. It is expected that the f
+ if (!wm_internal_)
+ return false;
wm_internal_.set_error_handler(this);
scoped_ptr<DefaultDisplayManager> display_manager(new DefaultDisplayManager(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698