mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-23 08:06:11 +00:00
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.
This commit is contained in:
@@ -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()));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user