mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
Everywhere: Use OOM-safe ByteBuffer APIs where possible
If we can easily communicate failure, let's avoid asserting and report failure instead.
This commit is contained in:
parent
6606993432
commit
3a9f00c59b
22 changed files with 135 additions and 67 deletions
|
@ -122,7 +122,8 @@ private:
|
|||
{
|
||||
if (!m_condition()) {
|
||||
write_to_buffer:;
|
||||
m_buffer.append(bytes.data(), bytes.size());
|
||||
if (!m_buffer.try_append(bytes.data(), bytes.size()))
|
||||
return 0;
|
||||
return bytes.size();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue