LibWeb: Pass optional status code to ResourceLoader callbacks

This is needed for XMLHttpRequest, and will certainly be useful for
other things, too.
This commit is contained in:
Linus Groh 2021-04-03 15:11:36 +02:00 committed by Andreas Kling
parent 975b209b9b
commit 000ef96613
Notes: sideshowbarker 2024-07-18 20:52:01 +09:00
8 changed files with 42 additions and 39 deletions

View file

@ -231,7 +231,7 @@ void HTMLScriptElement::prepare_script()
m_script_filename = url.basename();
ResourceLoader::the().load_sync(
url,
[this, url](auto data, auto&) {
[this, url](auto data, auto&, auto) {
if (data.is_null()) {
dbgln("HTMLScriptElement: Failed to load {}", url);
return;
@ -239,7 +239,7 @@ void HTMLScriptElement::prepare_script()
m_script_source = String::copy(data);
script_became_ready();
},
[this](auto&) {
[this](auto&, auto) {
m_failed_to_load = true;
});
} else {