LibWeb: Avoid URL validity check for 'Resource'

Which was previously signally an invalid Resource by a default
constructed invalid URL. Instead, switch this over to an Optional
URL.
This commit is contained in:
Shannon Booth 2025-04-19 16:59:36 +12:00 committed by Tim Flynn
parent 8ab541b3f6
commit 733dfdaa05
Notes: github-actions[bot] 2025-04-19 11:20:02 +00:00
5 changed files with 22 additions and 21 deletions

View file

@ -610,7 +610,7 @@ bool HTMLLinkElement::load_favicon_and_use_if_window_is_active()
return false;
// FIXME: Refactor the caller(s) to handle the async nature of image loading
auto promise = decode_favicon(resource()->encoded_data(), resource()->url(), document());
auto promise = decode_favicon(resource()->encoded_data(), *resource()->url(), document());
auto result = promise->await();
return !result.is_error();
}