LibWeb: Make HTMLMediaElement::set_decoder_error infallible

This used to propagate an OOM error, but that was removed, and this
method can no longer throw.
This commit is contained in:
Timothy Flynn 2024-04-26 11:51:26 -04:00 committed by Tim Flynn
parent 7c54a32870
commit dd16ea87c3
Notes: sideshowbarker 2024-07-17 01:13:25 +09:00
4 changed files with 6 additions and 8 deletions

View file

@ -127,7 +127,7 @@ void HTMLMediaElement::removed_from(DOM::Node* node)
}
// https://html.spec.whatwg.org/multipage/media.html#fatal-decode-error
WebIDL::ExceptionOr<void> HTMLMediaElement::set_decoder_error(String error_message)
void HTMLMediaElement::set_decoder_error(String error_message)
{
auto& realm = this->realm();
auto& vm = realm.vm();
@ -137,7 +137,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::set_decoder_error(String error_messa
// resource is usable (i.e. once the media element's readyState attribute is no longer HAVE_NOTHING) must cause the
// user agent to execute the following steps:
if (m_ready_state == ReadyState::HaveNothing)
return {};
return;
// 1. The user agent should cancel the fetching process.
if (m_fetch_controller)
@ -156,8 +156,6 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::set_decoder_error(String error_messa
dispatch_event(DOM::Event::create(realm, HTML::EventNames::error));
// FIXME: 6. Abort the overall resource selection algorithm.
return {};
}
// https://html.spec.whatwg.org/multipage/media.html#dom-media-buffered