mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb/IDL: Add support for returning JS::Object from IDL functions
This commit is contained in:
parent
a9a9614b6b
commit
df2c0588ea
Notes:
sideshowbarker
2024-07-17 10:16:24 +09:00
Author: https://github.com/Lubrsi
Commit: df2c0588ea
Pull-request: https://github.com/SerenityOS/serenity/pull/14184
Reviewed-by: https://github.com/Quaker762 ✅
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/linusg ✅
Reviewed-by: https://github.com/sunverwerth
1 changed files with 4 additions and 0 deletions
|
@ -1501,6 +1501,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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue