Description[Extensions Bindings] Allow for argument validation without conversion
Currently, the argument validation and and argument conversion happens
in a single step. This is good for the case when we need the JSON
serialized arguments, but in the case of custom JS hooks, the work is
unnecessary. However, we still need to match arguments to a signature
in that case.
Add another method to allow for matching, but not converting, the
arguments, and use it when we have a handle request JS hook. This is
in line with what the curent JS implementation does, and thus what our
custom bindings expect.
We also need to add support for parsing arguments that are functions,
since we are now validating for requests with custom handlers (which
can have functions as arguments other than callbacks).
Add a test that invoking a method with a custom binding with an invalid
invocation throws an error.
BUG=653596
Committed: https://crrev.com/6598b14ac84919777d8019054114b7b0aa6baec0
Cr-Commit-Position: refs/heads/master@{#440816}
Patch Set 1 : format #
Total comments: 6
Patch Set 2 : . #Patch Set 3 : jbroman #Patch Set 4 : add function support in ArgumentSpec::ParseArgument() #
Total comments: 2
Patch Set 5 : lazyboy's #
Messages
Total messages: 27 (16 generated)
|