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

Unified Diff: services/shell/public/cpp/lib/service_context.cc

Issue 2257693003: Handle early ServiceRequest errors in shell::ServiceContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 | « content/common/mojo/mojo_shell_connection_impl.cc ('k') | services/shell/public/cpp/service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/service_context.cc
diff --git a/services/shell/public/cpp/lib/service_context.cc b/services/shell/public/cpp/lib/service_context.cc
index 939faba4920899f3953d5bfbb0d41f9d4c1faf1c..6b7343bd717810e42745da6e5375191c4a09301d 100644
--- a/services/shell/public/cpp/lib/service_context.cc
+++ b/services/shell/public/cpp/lib/service_context.cc
@@ -28,6 +28,8 @@ ServiceContext::ServiceContext(shell::Service* service,
binding_(this, std::move(request)),
connector_(std::move(connector)) {
DCHECK(binding_.is_bound());
+ binding_.set_connection_error_handler(
+ base::Bind(&ServiceContext::OnConnectionError, base::Unretained(this)));
if (!connector_) {
connector_ = Connector::Create(&pending_connector_request_);
} else {
@@ -55,10 +57,6 @@ void ServiceContext::OnStart(const shell::Identity& identity,
callback.Run(std::move(pending_connector_request_));
- DCHECK(binding_.is_bound());
- binding_.set_connection_error_handler(
- base::Bind(&ServiceContext::OnConnectionError, base::Unretained(this)));
-
service_->OnStart(identity_);
}
« no previous file with comments | « content/common/mojo/mojo_shell_connection_impl.cc ('k') | services/shell/public/cpp/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698