Index: mojo/public/cpp/bindings/lib/interface_ptr_state.h |
diff --git a/mojo/public/cpp/bindings/lib/interface_ptr_state.h b/mojo/public/cpp/bindings/lib/interface_ptr_state.h |
index 341901c56d372125336029be1f128e43decc0557..78aa02e17635442ae394a7aa9d0109650fbbab1e 100644 |
--- a/mojo/public/cpp/bindings/lib/interface_ptr_state.h |
+++ b/mojo/public/cpp/bindings/lib/interface_ptr_state.h |
@@ -345,8 +345,13 @@ class InterfacePtrState<Interface, true> { |
if (!handle_.is_valid()) |
return; |
- router_ = new MultiplexRouter( |
- std::move(handle_), MultiplexRouter::MULTI_INTERFACE, true, runner_); |
+ MultiplexRouter::Config config = |
+ Interface::PassesAssociatedKinds_ |
+ ? MultiplexRouter::MULTI_INTERFACE |
+ : (Interface::HasSyncMethods_ |
+ ? MultiplexRouter::SINGLE_INTERFACE_WITH_SYNC_METHODS |
+ : MultiplexRouter::SINGLE_INTERFACE); |
+ router_ = new MultiplexRouter(std::move(handle_), config, true, runner_); |
router_->SetMasterInterfaceName(Interface::Name_); |
endpoint_client_.reset(new InterfaceEndpointClient( |
router_->CreateLocalEndpointHandle(kMasterInterfaceId), nullptr, |