LibWeb: Enable callbacks in execution contexts when teeing streams

This will be needed once fetched response bodies are read using streams.
This commit is contained in:
Timothy Flynn 2024-11-04 16:08:37 +01:00 committed by Andrew Kaster
commit 383d303b79
Notes: github-actions[bot] 2024-12-10 03:04:06 +00:00

View file

@ -709,7 +709,7 @@ public:
{
// 1. Queue a microtask to perform the following steps:
HTML::queue_a_microtask(nullptr, GC::create_function(m_realm->heap(), [this, chunk]() mutable {
HTML::TemporaryExecutionContext execution_context { m_realm };
HTML::TemporaryExecutionContext execution_context { m_realm, HTML::TemporaryExecutionContext::CallbacksEnabled::Yes };
auto controller1 = m_params->branch1->controller()->get<GC::Ref<ReadableByteStreamController>>();
auto controller2 = m_params->branch2->controller()->get<GC::Ref<ReadableByteStreamController>>();