Skip to content

Commit d6426e4

Browse files
committed
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.
1 parent 039fc0f commit d6426e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Libraries/LibHTML/ResourceLoader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ void ResourceLoader::load(const URL& url, Function<void(const ByteBuffer&)> call
4343
on_load_counter_change();
4444
if (!success) {
4545
dbg() << "HTTP load failed!";
46-
ASSERT_NOT_REACHED();
46+
callback({});
47+
return;
4748
}
4849
callback(ByteBuffer::copy(payload.data(), payload.size()));
4950
};

0 commit comments

Comments
 (0)