Integrate Mojo JS validation bindings with the Router
Instad of generating exported validateFooRequest(), validateFooResponse() methods, a pointer to a validation functions is added to the generated Stub and Proxy class prototypes. For example, given an interface Foo, with client interface FooClient: FooStub.prototype.validators = [validateFooRequest]; FooProxy.prototype.validators = [validateFooResponse]; Note that if interface Foo has no callbacks, then FooProxy.prototype.validators is an empty array. The router validates incoming messages using these functions and validateMessageHeader(). BUG=407181 Review URL: https://codereview.chromium.org/488173006 Cr-Commit-Position: refs/heads/master@{#292270}
Showing
Please register or sign in to comment