mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Use Vector<ByteBuffer> to store chunks in ReadLoopReadRequest
This stores the incoming chunks into a Vector of ByteBuffer in order to be able to retrieve them in the same order as they came in.
This commit is contained in:
parent
cb5f30ae98
commit
12cfa08a09
Notes:
sideshowbarker
2024-07-17 03:27:40 +09:00
Author: https://github.com/kennethmyhra
Commit: 12cfa08a09
Pull-request: https://github.com/SerenityOS/serenity/pull/23869
Reviewed-by: https://github.com/shannonbooth ✅
2 changed files with 10 additions and 6 deletions
|
@ -36,7 +36,7 @@ class ReadLoopReadRequest final : public ReadRequest {
|
|||
|
||||
public:
|
||||
// successSteps, which is an algorithm accepting a byte sequence
|
||||
using SuccessSteps = JS::SafeFunction<void(ByteBuffer)>;
|
||||
using SuccessSteps = JS::SafeFunction<void(Vector<ByteBuffer> const&)>;
|
||||
|
||||
// failureSteps, which is an algorithm accepting a JavaScript value
|
||||
using FailureSteps = JS::SafeFunction<void(JS::Value error)>;
|
||||
|
@ -55,7 +55,7 @@ private:
|
|||
JS::VM& m_vm;
|
||||
JS::NonnullGCPtr<JS::Realm> m_realm;
|
||||
JS::NonnullGCPtr<ReadableStreamDefaultReader> m_reader;
|
||||
ByteBuffer m_bytes;
|
||||
Vector<ByteBuffer> m_byte_chunks;
|
||||
SuccessSteps m_success_steps;
|
||||
FailureSteps m_failure_steps;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue