summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp b/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
index 52d2e80e41..470135b4ae 100644
--- a/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
+++ b/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
@@ -553,7 +553,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Function");
@return_statement@
}
- @cpp_name@ = adopt(*new EventListener(JS::make_handle(&@js_name@@js_suffix@.as_function())));
+ @cpp_name@ = adopt_ref(*new EventListener(JS::make_handle(&@js_name@@js_suffix@.as_function())));
}
)~~~");
} else {
@@ -562,7 +562,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Function");
@return_statement@
}
- auto @cpp_name@ = adopt(*new EventListener(JS::make_handle(&@js_name@@js_suffix@.as_function())));
+ auto @cpp_name@ = adopt_ref(*new EventListener(JS::make_handle(&@js_name@@js_suffix@.as_function())));
)~~~");
}
} else if (is_wrappable_type(parameter.type)) {