diff --git a/Tests/LibWeb/Text/expected/failed-img-should-not-delay-load-event-forever.txt b/Tests/LibWeb/Text/expected/failed-img-should-not-delay-load-event-forever.txt new file mode 100644 index 00000000000..5df6241a8b5 --- /dev/null +++ b/Tests/LibWeb/Text/expected/failed-img-should-not-delay-load-event-forever.txt @@ -0,0 +1 @@ + PASS diff --git a/Tests/LibWeb/Text/input/failed-img-should-not-delay-load-event-forever.html b/Tests/LibWeb/Text/input/failed-img-should-not-delay-load-event-forever.html new file mode 100644 index 00000000000..b67283b3a4a --- /dev/null +++ b/Tests/LibWeb/Text/input/failed-img-should-not-delay-load-event-forever.html @@ -0,0 +1,7 @@ + + + diff --git a/Userland/Libraries/LibWeb/HTML/SharedImageRequest.cpp b/Userland/Libraries/LibWeb/HTML/SharedImageRequest.cpp index 46b4e1d3d72..3abb5c7b3bf 100644 --- a/Userland/Libraries/LibWeb/HTML/SharedImageRequest.cpp +++ b/Userland/Libraries/LibWeb/HTML/SharedImageRequest.cpp @@ -84,6 +84,8 @@ void SharedImageRequest::fetch_image(JS::Realm& realm, JS::NonnullGCPtrbody()) response->body()->fully_read(realm, move(process_body), move(process_body_error), JS::NonnullGCPtr { realm.global_object() }).release_value_but_fixme_should_propagate_errors(); + else + handle_failed_fetch(); }; m_state = State::Fetching;