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

LibWeb: Fix FrameLoader::load_error_page

We weren't properly creating a `LoadRequest` which resulted in `m_page`
not having a value in certain situations inside
`ResourceLoader::load(LoadRequest&)`
This commit is contained in:
Cameron Youell 2023-01-19 01:44:37 +11:00 committed by Linus Groh
parent ce1b7e63c9
commit c6df488a1f

View file

@ -335,8 +335,10 @@ void FrameLoader::set_error_page_url(DeprecatedString error_page_url)
void FrameLoader::load_error_page(const AK::URL& failed_url, DeprecatedString const& error)
{
LoadRequest request = LoadRequest::create_for_url_on_page(s_error_page_url, browsing_context().page());
ResourceLoader::the().load(
s_error_page_url,
request,
[this, failed_url, error](auto data, auto&, auto) {
VERIFY(!data.is_null());
StringBuilder builder;