mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
AK: Make "foo"_string infallible
Stop worrying about tiny OOMs. Work towards #20405.
This commit is contained in:
parent
db2a8725c6
commit
34344120f2
Notes:
sideshowbarker
2024-07-16 20:31:50 +09:00
Author: https://github.com/awesomekling
Commit: 34344120f2
Pull-request: https://github.com/SerenityOS/serenity/pull/20408
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