LibWeb: Allow EventListener/NodeFilter path to propagate errors

This allows the EventListener/NodeFilter path of the BindingsGenerator
to propagate errors if needed.
This commit is contained in:
Kenneth Myhra 2023-02-19 15:43:50 +01:00 committed by Andreas Kling
parent e57461b89e
commit 3689d58c64
Notes: sideshowbarker 2024-07-17 10:10:18 +09:00

View file

@ -389,7 +389,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, TRY_OR_THROW_OOM(vm, @js_name@@js_suffix@.to_string_without_side_effects()));
auto callback_type = vm.heap().allocate_without_realm<WebIDL::CallbackType>(@js_name@@js_suffix@.as_object(), HTML::incumbent_settings_object());
@cpp_name@ = @cpp_type@::create(realm, *callback_type).ptr();
@cpp_name@ = TRY(throw_dom_exception_if_needed(vm, [&] { return @cpp_type@::create(realm, *callback_type); }));
}
)~~~");
} else {