summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp2
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLTypes.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp
index 0dc6fb103b..61b9ec8b4b 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp
@@ -1475,7 +1475,7 @@ static Optional<String> generate_arguments_match_check_for_count(Vector<IDL::Par
Vector<String> conditions;
for (auto i = 0u; i < argument_count; ++i) {
auto const& parameter = parameters[i];
- if (parameter.type->is_string() || parameter.type->is_numeric())
+ if (parameter.type->is_string() || parameter.type->is_primitive())
continue;
auto argument = String::formatted("arg{}", i);
StringBuilder condition;
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLTypes.h b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLTypes.h
index ad8424948e..6874d0190c 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLTypes.h
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLTypes.h
@@ -61,6 +61,9 @@ struct Type : public RefCounted<Type> {
// https://webidl.spec.whatwg.org/#dfn-numeric-type
bool is_numeric() const { return is_integer() || name.is_one_of("float", "unrestricted float", "double", "unrestricted double"); }
+
+ // https://webidl.spec.whatwg.org/#dfn-primitive-type
+ bool is_primitive() const { return is_numeric() || name.is_one_of("bigint", "boolean"); }
};
struct Parameter {