mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 11:39:44 +03: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
Notes:
sideshowbarker
2024-07-17 10:10:18 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/3689d58c64 Pull-request: https://github.com/SerenityOS/serenity/pull/17542
@ -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…
Reference in New Issue
Block a user