summaryrefslogtreecommitdiff
path: root/Meta/Lagom
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2022-06-04 04:07:19 +0100
committerLinus Groh <mail@linusgroh.de>2022-06-13 21:45:27 +0100
commitdf2c0588eabbee9b113513f40e8881a3be773b5e (patch)
tree5139abaa94f442f444edebffa1b3f4c2bb19edc7 /Meta/Lagom
parenta9a9614b6bb0ce9d90401bd2e963bd6cff02fb15 (diff)
downloadserenity-df2c0588eabbee9b113513f40e8881a3be773b5e.zip
LibWeb/IDL: Add support for returning JS::Object from IDL functions
Diffstat (limited to 'Meta/Lagom')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp
index 28a839fd66..062c6c4ffe 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp
@@ -1502,6 +1502,10 @@ static void generate_wrap_statement(SourceGenerator& generator, String const& va
dictionary_generator.append(R"~~~(
@result_expression@ dictionary_object@recursion_depth@;
)~~~");
+ } else if (type.name == "object") {
+ scoped_generator.append(R"~~~(
+ @result_expression@ JS::Value(const_cast<JS::Object*>(@value@));
+)~~~");
} else {
if (wrapping_reference == WrappingReference::No) {
scoped_generator.append(R"~~~(