summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2023-05-13 13:32:01 +0100
committerAndreas Kling <kling@serenityos.org>2023-05-13 16:31:10 +0200
commitd08861956008ca5ca5d2ff80f75d695d49dc5ede (patch)
tree9d144f45400a5191c13635ead2c068af7c38d640 /Meta
parentf62bcba56ade843e91e9a22b3a43f3fa2aceca82 (diff)
downloadserenity-d08861956008ca5ca5d2ff80f75d695d49dc5ede.zip
LibWeb: Capture realm in dictionary to C++ conversion
Some types use the realm when converting to C++, such as unions.
Diffstat (limited to 'Meta')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp
index c377e82ff0..251575c70a 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp
@@ -1007,7 +1007,9 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
// The lambda must take the JS::Value to convert as a parameter instead of capturing it in order to support union types being variadic.
dictionary_generator.append(R"~~~(
- auto @js_name@@js_suffix@_to_dictionary = [&vm](JS::Value @js_name@@js_suffix@) -> JS::ThrowCompletionOr<@dictionary.type@> {
+ auto @js_name@@js_suffix@_to_dictionary = [&vm, &realm](JS::Value @js_name@@js_suffix@) -> JS::ThrowCompletionOr<@dictionary.type@> {
+ // This might be unused.
+ (void)realm;
)~~~");
IDL::Parameter dictionary_parameter { .type = *dictionary_type, .name = acceptable_cpp_name, .optional_default_value = {}, .extended_attributes = {} };