mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 00:57:43 +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:
parent
039fc0f2d1
commit
d6426e4af9
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,8 @@ void ResourceLoader::load(const URL& url, Function<void(const ByteBuffer&)> call
|
||||||
on_load_counter_change();
|
on_load_counter_change();
|
||||||
if (!success) {
|
if (!success) {
|
||||||
dbg() << "HTTP load failed!";
|
dbg() << "HTTP load failed!";
|
||||||
ASSERT_NOT_REACHED();
|
callback({});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
callback(ByteBuffer::copy(payload.data(), payload.size()));
|
callback(ByteBuffer::copy(payload.data(), payload.size()));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue