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

Unified Diff: content/common/mojo/service_registry_impl.cc

Issue 1525033004: Always set the error handler closure of Binding<> after binding to a message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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/runner/child/runner_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/service_registry_impl.cc
diff --git a/content/common/mojo/service_registry_impl.cc b/content/common/mojo/service_registry_impl.cc
index c1df33a1bd51ba0506d79c7da4ddd843e8f05669..2303f3b97236bc8c416a48e3b9f1a1b4d163f2e9 100644
--- a/content/common/mojo/service_registry_impl.cc
+++ b/content/common/mojo/service_registry_impl.cc
@@ -9,11 +9,7 @@
namespace content {
ServiceRegistryImpl::ServiceRegistryImpl()
- : binding_(this), weak_factory_(this) {
- binding_.set_connection_error_handler(
- base::Bind(&ServiceRegistryImpl::OnConnectionError,
- base::Unretained(this)));
-}
+ : binding_(this), weak_factory_(this) {}
ServiceRegistryImpl::~ServiceRegistryImpl() {
while (!pending_connects_.empty()) {
@@ -25,6 +21,8 @@ ServiceRegistryImpl::~ServiceRegistryImpl() {
void ServiceRegistryImpl::Bind(
mojo::InterfaceRequest<mojo::ServiceProvider> request) {
binding_.Bind(request.Pass());
+ binding_.set_connection_error_handler(base::Bind(
+ &ServiceRegistryImpl::OnConnectionError, base::Unretained(this)));
}
void ServiceRegistryImpl::BindRemoteServiceProvider(
« no previous file with comments | « no previous file | mojo/runner/child/runner_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698