summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/XHR
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-04-03 15:11:36 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-03 16:34:34 +0200
commit000ef96613466427a4a84103778e6f0a423e2845 (patch)
tree68e64ce867ba1506f5ae7f62b1f7670a0589b42c /Userland/Libraries/LibWeb/XHR
parent975b209b9bc2b495410caea3117e593af1daea20 (diff)
downloadserenity-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/XHR')
-rw-r--r--Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
index b7ad3b4b93..94a6bef629 100644
--- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
+++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
@@ -228,7 +228,7 @@ DOM::ExceptionOr<void> XMLHttpRequest::send()
// we need to make ResourceLoader give us more detailed updates than just "done" and "error".
ResourceLoader::the().load(
request,
- [weak_this = make_weak_ptr()](auto data, auto&) {
+ [weak_this = make_weak_ptr()](auto data, auto&, auto) {
if (!weak_this)
return;
auto& xhr = const_cast<XMLHttpRequest&>(*weak_this);
@@ -248,7 +248,7 @@ DOM::ExceptionOr<void> XMLHttpRequest::send()
xhr.fire_progress_event(EventNames::load, transmitted, length);
xhr.fire_progress_event(EventNames::loadend, transmitted, length);
},
- [weak_this = make_weak_ptr()](auto& error) {
+ [weak_this = make_weak_ptr()](auto& error, auto) {
if (!weak_this)
return;
dbgln("XHR failed to load: {}", error);