mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 00:35:08 +00:00
AK: Make "foo"_string infallible
Stop worrying about tiny OOMs. Work towards #20405.
This commit is contained in:
parent
db2a8725c6
commit
34344120f2
181 changed files with 626 additions and 630 deletions
|
@ -829,7 +829,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::select_resource()
|
|||
// 1. ⌛ If the src attribute's value is the empty string, then end the synchronous section, and jump down to the failed with attribute step below.
|
||||
auto source = attribute(HTML::AttributeNames::src);
|
||||
if (source.is_empty()) {
|
||||
failed_with_attribute(TRY_OR_THROW_OOM(vm, "The 'src' attribute is empty"_string));
|
||||
failed_with_attribute("The 'src' attribute is empty"_string);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -850,7 +850,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::select_resource()
|
|||
return {};
|
||||
}
|
||||
|
||||
failed_with_attribute(TRY_OR_THROW_OOM(vm, "Failed to parse 'src' attribute as a URL"_string));
|
||||
failed_with_attribute("Failed to parse 'src' attribute as a URL"_string);
|
||||
|
||||
// 8. Return. The element won't attempt to load another resource until this algorithm is triggered again.
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue