mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +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
Notes:
sideshowbarker
2024-07-19 11:01:27 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d6426e4af97
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();
|
||||
if (!success) {
|
||||
dbg() << "HTTP load failed!";
|
||||
ASSERT_NOT_REACHED();
|
||||
callback({});
|
||||
return;
|
||||
}
|
||||
callback(ByteBuffer::copy(payload.data(), payload.size()));
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue