mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-27 03:10:01 +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
|
@ -63,7 +63,7 @@ void FetchedDataReceiver::on_data_received(ReadonlyBytes bytes)
|
|||
// 3. Queue a fetch task to run the following steps, with fetchParams’s task destination.
|
||||
Infrastructure::queue_fetch_task(
|
||||
m_fetch_params->controller(),
|
||||
m_fetch_params->task_destination().get<GC::Ref<JS::Object>>(),
|
||||
m_fetch_params->task_destination(),
|
||||
GC::create_function(heap(), [this, bytes = MUST(ByteBuffer::copy(bytes))]() mutable {
|
||||
HTML::TemporaryExecutionContext execution_context { m_stream->realm(), HTML::TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue