diff options
author | Linus Groh <mail@linusgroh.de> | 2021-04-03 15:11:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-03 16:34:34 +0200 |
commit | 000ef96613466427a4a84103778e6f0a423e2845 (patch) | |
tree | 68e64ce867ba1506f5ae7f62b1f7670a0589b42c /Userland/Libraries/LibWeb/Loader/FrameLoader.cpp | |
parent | 975b209b9bc2b495410caea3117e593af1daea20 (diff) | |
download | serenity-000ef96613466427a4a84103778e6f0a423e2845.zip |
LibWeb: Pass optional status code to ResourceLoader callbacks
This is needed for XMLHttpRequest, and will certainly be useful for
other things, too.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader/FrameLoader.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Loader/FrameLoader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp index de60ced9da..ac39ef1b7f 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp @@ -178,7 +178,7 @@ bool FrameLoader::load(const LoadRequest& request, Type type) ResourceLoader::the().load( favicon_url, - [this, favicon_url](auto data, auto&) { + [this, favicon_url](auto data, auto&, auto) { dbgln("Favicon downloaded, {} bytes from {}", data.size(), favicon_url); auto decoder = Gfx::ImageDecoder::create(data.data(), data.size()); auto bitmap = decoder->bitmap(); @@ -226,7 +226,7 @@ void FrameLoader::load_error_page(const URL& failed_url, const String& error) auto error_page_url = "file:///res/html/error.html"; ResourceLoader::the().load( error_page_url, - [this, failed_url, error](auto data, auto&) { + [this, failed_url, error](auto data, auto&, auto) { VERIFY(!data.is_null()); #pragma GCC diagnostic ignored "-Wformat-nonliteral" auto html = String::format( @@ -238,7 +238,7 @@ void FrameLoader::load_error_page(const URL& failed_url, const String& error) VERIFY(document); frame().set_document(document); }, - [](auto error) { + [](auto& error, auto) { dbgln("Failed to load error page: {}", error); VERIFY_NOT_REACHED(); }); |