mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb: Enable callbacks in chunk steps for ReadableStreamDefaultTee
We enqueue a microtask for this readable stream AO, and the methods that we call from the chunk steps manipulate promises. As such, we need to enable callbacks for the entire microtask's temporary execution context.
This commit is contained in:
committed by
Andreas Kling
parent
bab546472e
commit
a68222f654
Notes:
sideshowbarker
2024-07-17 18:49:10 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/a68222f654 Pull-request: https://github.com/SerenityOS/serenity/pull/24420 Issue: https://github.com/SerenityOS/serenity/issues/24419
@@ -401,7 +401,7 @@ public:
|
||||
{
|
||||
// 1. Queue a microtask to perform the following steps:
|
||||
HTML::queue_a_microtask(nullptr, JS::create_heap_function(m_realm->heap(), [this, chunk]() {
|
||||
HTML::TemporaryExecutionContext execution_context { Bindings::host_defined_environment_settings_object(m_realm) };
|
||||
HTML::TemporaryExecutionContext execution_context { Bindings::host_defined_environment_settings_object(m_realm), HTML::TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
|
||||
auto controller1 = m_params->branch1->controller()->get<JS::NonnullGCPtr<ReadableStreamDefaultController>>();
|
||||
auto controller2 = m_params->branch2->controller()->get<JS::NonnullGCPtr<ReadableStreamDefaultController>>();
|
||||
|
||||
Reference in New Issue
Block a user