mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Add "parallel queue" and allow it as fetch task destination
Note that it's not actually executing tasks in parallel, it's still throwing them on the HTML event loop task queue, each with its own unique task source. This makes our fetch implementation a lot more robust when HTTP caching is enabled, and you can now click links on https://terminal.shop/ without hitting TODO assertions in fetch.
This commit is contained in:
parent
9a5ef95022
commit
03256a2543
Notes:
github-actions[bot]
2025-07-16 22:14:47 +00:00
Author: https://github.com/awesomekling
Commit: 03256a2543
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5471
10 changed files with 65 additions and 44 deletions
|
@ -17,7 +17,7 @@ class IncrementalReadLoopReadRequest : public Streams::ReadRequest {
|
|||
GC_DECLARE_ALLOCATOR(IncrementalReadLoopReadRequest);
|
||||
|
||||
public:
|
||||
IncrementalReadLoopReadRequest(GC::Ref<Body>, GC::Ref<Streams::ReadableStreamDefaultReader>, GC::Ref<JS::Object> task_destination, Body::ProcessBodyChunkCallback, Body::ProcessEndOfBodyCallback, Body::ProcessBodyErrorCallback);
|
||||
IncrementalReadLoopReadRequest(GC::Ref<Body>, GC::Ref<Streams::ReadableStreamDefaultReader>, TaskDestination, Body::ProcessBodyChunkCallback, Body::ProcessEndOfBodyCallback, Body::ProcessBodyErrorCallback);
|
||||
|
||||
virtual void on_chunk(JS::Value chunk) override;
|
||||
virtual void on_close() override;
|
||||
|
@ -28,7 +28,7 @@ private:
|
|||
|
||||
GC::Ref<Body> m_body;
|
||||
GC::Ref<Streams::ReadableStreamDefaultReader> m_reader;
|
||||
GC::Ref<JS::Object> m_task_destination;
|
||||
TaskDestination m_task_destination;
|
||||
Body::ProcessBodyChunkCallback m_process_body_chunk;
|
||||
Body::ProcessEndOfBodyCallback m_process_end_of_body;
|
||||
Body::ProcessBodyErrorCallback m_process_body_error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue