bindings: Ignores the last undefined arguments when counting the args.
foo(arg1, arg2, undefined) should be interpreted as foo(arg1, arg2).
This CL checks if the last arguments are undefined or not, and counts
the number of actual arguments.
With this change, overloaded C++ functions, such as foo(int, int, T*)
and foo(int, int), will be resolved correctly. Note that
DOMTokenList::toggle("name")
and
DOMTokenList::toggle("name", false)
behave *differently*. (Oh, my...)
So, it's important to count the actual number of arguments correctly.
BUG=
489665
Committed:
https://crrev.com/a9a901bc9a158c5e60cda9bbb96fa50ce0c76489
Cr-Commit-Position: refs/heads/master@{#362635}