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

Unified Diff: mojo/public/cpp/bindings/lib/binding_state.h

Issue 2064903002: Mojo: Report bindings validation errors via MojoNotifyBadMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
Index: mojo/public/cpp/bindings/lib/binding_state.h
diff --git a/mojo/public/cpp/bindings/lib/binding_state.h b/mojo/public/cpp/bindings/lib/binding_state.h
index 4f4185a515c39debcce02079cdeaa4407648a443..0139942b85058262bf3ee44518de3f6bbc030a51 100644
--- a/mojo/public/cpp/bindings/lib/binding_state.h
+++ b/mojo/public/cpp/bindings/lib/binding_state.h
@@ -50,13 +50,14 @@ class BindingState<Interface, false> {
scoped_refptr<base::SingleThreadTaskRunner> runner) {
DCHECK(!router_);
internal::FilterChain filters;
- filters.Append<internal::MessageHeaderValidator>();
+ filters.Append<internal::MessageHeaderValidator>(Interface::Name_);
filters.Append<typename Interface::RequestValidator_>();
router_ =
new internal::Router(std::move(handle), std::move(filters),
Interface::HasSyncMethods_, std::move(runner));
router_->set_incoming_receiver(&stub_);
+ router_->set_interface_name(Interface::Name_);
router_->set_connection_error_handler(
[this]() { connection_error_handler_.Run(); });
}
@@ -146,6 +147,7 @@ class BindingState<Interface, true> {
DCHECK(!router_);
router_ = new internal::MultiplexRouter(false, std::move(handle), runner);
+ router_->SetMasterInterfaceName(Interface::Name_);
stub_.serialization_context()->router = router_;
endpoint_client_.reset(new internal::InterfaceEndpointClient(
@@ -155,6 +157,7 @@ class BindingState<Interface, true> {
endpoint_client_->set_connection_error_handler(
[this]() { connection_error_handler_.Run(); });
+ endpoint_client_->set_interface_name(Interface::Name_);
}
bool HasAssociatedInterfaces() const {

Powered by Google App Engine
This is Rietveld 408576698