LibWeb: Make TemporaryExecutionContext take a Realm&

This commit is contained in:
Shannon Booth
2024-10-24 20:39:18 +13:00
committed by Andrew Kaster
parent f7a4d94b24
commit cc91473f4d
34 changed files with 106 additions and 107 deletions

View File

@@ -402,7 +402,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::CallbacksEnabled::Yes };
HTML::TemporaryExecutionContext execution_context { 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>>();
@@ -709,7 +709,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]() mutable {
HTML::TemporaryExecutionContext execution_context { Bindings::host_defined_environment_settings_object(m_realm) };
HTML::TemporaryExecutionContext execution_context { m_realm };
auto controller1 = m_params->branch1->controller()->get<JS::NonnullGCPtr<ReadableByteStreamController>>();
auto controller2 = m_params->branch2->controller()->get<JS::NonnullGCPtr<ReadableByteStreamController>>();
@@ -872,7 +872,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 = chunk_view]() {
HTML::TemporaryExecutionContext execution_context { Bindings::host_defined_environment_settings_object(m_realm) };
HTML::TemporaryExecutionContext execution_context { m_realm };
auto byob_controller = m_byob_branch->controller()->get<JS::NonnullGCPtr<ReadableByteStreamController>>();
auto other_controller = m_other_branch->controller()->get<JS::NonnullGCPtr<ReadableByteStreamController>>();