mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 23:08:11 +00:00
LibWeb: Fire the fail callback on SharedImageRequest when they fail
This fixes an issue where failed image loads would delay the document load event forever.
This commit is contained in:
parent
8e0320626d
commit
2a86bd8c91
3 changed files with 10 additions and 0 deletions
|
@ -0,0 +1 @@
|
||||||
|
PASS
|
|
@ -0,0 +1,7 @@
|
||||||
|
<script src="include.js"></script>
|
||||||
|
<img src="invalid-protocol:foo">
|
||||||
|
<script>
|
||||||
|
test(() => {
|
||||||
|
println("PASS");
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -84,6 +84,8 @@ void SharedImageRequest::fetch_image(JS::Realm& realm, JS::NonnullGCPtr<Fetch::I
|
||||||
|
|
||||||
if (response->body())
|
if (response->body())
|
||||||
response->body()->fully_read(realm, move(process_body), move(process_body_error), JS::NonnullGCPtr { realm.global_object() }).release_value_but_fixme_should_propagate_errors();
|
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;
|
m_state = State::Fetching;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue