IDL: reuse more code between CG for methods and constructors

The CG for constructors and named constructors had its own simplified
mechanism for generating the actual call to the C++ constructor, rather
than using v8_methods.cpp_value(). Except for constructors with
optional arguments without default values, which used cpp_value() via
v8_methods.generate_argument() to generate the "short-cut" call used
when the function is called without the optional arguments.

With this patch, v8_methods.cpp_value() is used for all calls. This
will make it easier to adjust the handling of arguments later on in the
more complex cases.

Some IDL files that declare named constructors are modified by adding
ConstructorCallWith=Document, which was previously implied for named
constructors.

BUG=258153

Review URL: https://codereview.chromium.org/340443004

git-svn-id: svn://svn.chromium.org/blink/trunk@176390 bbb929c8-8fbe-4397-9dbb-9b2b20218538
19 files changed
tree: bd8a7202b45c584caa2ef669449bede8676c8079
  1. third_party/