1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:05:08 +00:00

LibWeb: Handle currently ignored WebIDL::ExceptionOr<T>s

This commit is contained in:
Linus Groh 2022-10-30 17:50:04 +00:00
parent f01d90aa63
commit acfb546048
38 changed files with 153 additions and 149 deletions

View file

@ -1423,7 +1423,9 @@ JS_DEFINE_NATIVE_FUNCTION(Window::post_message)
{
auto* impl = TRY(impl_from(vm));
auto target_origin = TRY(vm.argument(1).to_string(vm));
impl->post_message_impl(vm.argument(0), target_origin);
TRY(Bindings::throw_dom_exception_if_needed(vm, [&] {
return impl->post_message_impl(vm.argument(0), target_origin);
}));
return JS::js_undefined();
}