• hansmuller's avatar
    Integrate Mojo JS validation bindings with the Router · 08768f75
    hansmuller authored
    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}
    08768f75
validation_unittests.js 8.04 KB