summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-30 11:58:47 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-30 11:58:47 +0100
commitd6426e4af97b1b411b373f98927084eaad6e0625 (patch)
tree79e0229e30de1bf318bf744b662e145c64c0cf0b /Libraries/LibHTML
parent039fc0f2d1be294990154262397b30ff5fc61b5c (diff)
downloadserenity-d6426e4af97b1b411b373f98927084eaad6e0625.zip
LibHTML: Allow resource loads to fail
It's perfectly normal for resource loads to fail sometimes. When they do, we now simply pass a null buffer to the callback.
Diffstat (limited to 'Libraries/LibHTML')
-rw-r--r--Libraries/LibHTML/ResourceLoader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibHTML/ResourceLoader.cpp b/Libraries/LibHTML/ResourceLoader.cpp
index 12084d2dc5..2e0fcdbf60 100644
--- a/Libraries/LibHTML/ResourceLoader.cpp
+++ b/Libraries/LibHTML/ResourceLoader.cpp
@@ -43,7 +43,8 @@ void ResourceLoader::load(const URL& url, Function<void(const ByteBuffer&)> call
on_load_counter_change();
if (!success) {
dbg() << "HTTP load failed!";
- ASSERT_NOT_REACHED();
+ callback({});
+ return;
}
callback(ByteBuffer::copy(payload.data(), payload.size()));
};