mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibCompress+AK: Dont short-circuit error handling propagation
In the case that both the stream and the wrapped substream had errors to be handled only one of the two would be resolved due to boolean short circuiting. this commit ensures both are handled irregardless of one another.
This commit is contained in:
parent
c684af1f83
commit
ea5f83616e
Notes:
sideshowbarker
2024-07-18 21:18:28 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/ea5f83616e8 Pull-request: https://github.com/SerenityOS/serenity/pull/5818
2 changed files with 4 additions and 2 deletions
|
@ -118,7 +118,8 @@ public:
|
|||
|
||||
bool handle_any_error() override
|
||||
{
|
||||
return m_stream.handle_any_error() || Stream::handle_any_error();
|
||||
bool handled_errors = m_stream.handle_any_error();
|
||||
return Stream::handle_any_error() || handled_errors;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -323,7 +323,8 @@ bool DeflateDecompressor::unreliable_eof() const { return m_state == State::Idle
|
|||
|
||||
bool DeflateDecompressor::handle_any_error()
|
||||
{
|
||||
return m_input_stream.handle_any_error() || Stream::handle_any_error();
|
||||
bool handled_errors = m_input_stream.handle_any_error();
|
||||
return Stream::handle_any_error() || handled_errors;
|
||||
}
|
||||
|
||||
Optional<ByteBuffer> DeflateDecompressor::decompress_all(ReadonlyBytes bytes)
|
||||
|
|
Loading…
Add table
Reference in a new issue