mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
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:
parent
e57461b89e
commit
3689d58c64
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue