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

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

Issue 2157143002: Move interface registration to OnConnect in RPH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 | « content/child/child_thread_impl.cc ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/mojo_shell_connection_impl.cc
diff --git a/content/common/mojo/mojo_shell_connection_impl.cc b/content/common/mojo/mojo_shell_connection_impl.cc
index ee7ff9767d7ee411493ea079b65e2bca9997e386..06419ba76e3fbf79db6b572e302f457a2a726c28 100644
--- a/content/common/mojo/mojo_shell_connection_impl.cc
+++ b/content/common/mojo/mojo_shell_connection_impl.cc
@@ -86,7 +86,7 @@ class MojoShellConnectionImpl::IOThreadContext
// Safe to call any time before Start() is called.
void AddConnectionFilter(std::unique_ptr<ConnectionFilter> filter) {
- DCHECK(!started_);
+ //DCHECK(!started_);
connection_filters_.emplace_back(std::move(filter));
}
@@ -390,10 +390,13 @@ void MojoShellConnectionImpl::SetupInterfaceRequestProxies(
base::Bind(&MojoShellConnectionImpl::GetInterface,
weak_factory_.GetWeakPtr(), registry));
- // Forward all remote interface requests on |provider| to our IO-thread
- // context. This will ensure they're forwarded to the provider on the
- // incoming browser connection.
- provider->Forward(base::Bind(&IOThreadContext::GetRemoteInterface, context_));
+ if (provider) {
+ // Forward all remote interface requests on |provider| to our IO-thread
+ // context. This will ensure they're forwarded to the provider on the
+ // incoming browser connection.
+ provider->Forward(base::Bind(&IOThreadContext::GetRemoteInterface,
+ context_));
+ }
}
void MojoShellConnectionImpl::AddConnectionFilter(
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698