diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2022-04-03 18:36:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-05 22:33:44 +0200 |
commit | 887e13f364c1f149577ad6624fa9be1ce03c6e72 (patch) | |
tree | c19e2fb4d32a36f3204ecb613821feccb6d5b84a | |
parent | ba23d036bdea49034bb46707c69d2982ac363d7d (diff) | |
download | serenity-887e13f364c1f149577ad6624fa9be1ce03c6e72.zip |
LibWeb: Get argument count from Function::parameters::size()
Previously this retrieved argument count from Function::length() which
did not return the correct count in all situations.
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp index 61b9ec8b4b..f1fc81d531 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp @@ -1530,7 +1530,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::@function.name:snakecase@) auto fetched_arguments = 0u; for (auto i = 0u; i < overloaded_functions.size(); ++i) { auto const& overloaded_function = overloaded_functions[i]; - auto argument_count = overloaded_function.length(); + auto argument_count = overloaded_function.parameters.size(); function_generator.set("argument_count", String::number(argument_count)); function_generator.set("arguments_match_check", generate_arguments_match_check(overloaded_function)); |