diff --git a/Userland/Libraries/LibJS/Runtime/Completion.cpp b/Userland/Libraries/LibJS/Runtime/Completion.cpp index 426fd4f8bd3..5399183373b 100644 --- a/Userland/Libraries/LibJS/Runtime/Completion.cpp +++ b/Userland/Libraries/LibJS/Runtime/Completion.cpp @@ -39,8 +39,9 @@ ThrowCompletionOr await(VM& vm, Value value) // 2. Let promise be ? PromiseResolve(%Promise%, value). auto* promise_object = TRY(promise_resolve(vm, realm.intrinsics().promise_constructor(), value)); - Optional success; - Value result; + IGNORE_USE_IN_ESCAPING_LAMBDA Optional success; + IGNORE_USE_IN_ESCAPING_LAMBDA Value result; + // 3. Let fulfilledClosure be a new Abstract Closure with parameters (value) that captures asyncContext and performs the following steps when called: auto fulfilled_closure = [&success, &result](VM& vm) -> ThrowCompletionOr { // a. Let prevContext be the running execution context. diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index fc113ee4ba9..b2f7b1ca90a 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -3048,7 +3048,7 @@ void Document::destroy_a_document_and_its_descendants(JS::SafeFunction a auto child_navigables = document_tree_child_navigables(); // 3. Let numberDestroyed be 0. - size_t number_destroyed = 0; + IGNORE_USE_IN_ESCAPING_LAMBDA size_t number_destroyed = 0; // 3. For each childNavigable of childNavigable's, queue a global task on the navigation and traversal task source // given childNavigable's active window to perform the following steps: @@ -3249,7 +3249,7 @@ void Document::unload_a_document_and_its_descendants(JS::GCPtr new_doc auto child_navigables = document_tree_child_navigables(); // 2. Let numberUnloaded be 0. - size_t number_unloaded = 0; + IGNORE_USE_IN_ESCAPING_LAMBDA size_t number_unloaded = 0; // Spec FIXME: in what order? // 3. For each childNavigable of childNavigable's, queue a global task on the navigation and traversal task source diff --git a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp index 44c9c2e1cd4..23d1efceabf 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp @@ -821,7 +821,7 @@ WebIDL::ExceptionOr HTMLMediaElement::select_resource() // -> If mode is attribute case SelectMode::Attribute: { auto failed_with_attribute = [this](auto error_message) { - bool ran_media_element_task = false; + IGNORE_USE_IN_ESCAPING_LAMBDA bool ran_media_element_task = false; // 6. Failed with attribute: Reaching this step indicates that the media resource failed to load or that the given URL could not be parsed. Take // pending play promises and queue a media element task given the media element to run the dedicated media source failure steps with the result. diff --git a/Userland/Libraries/LibWeb/HTML/TraversableNavigable.cpp b/Userland/Libraries/LibWeb/HTML/TraversableNavigable.cpp index f6591ba228d..6230b204bb5 100644 --- a/Userland/Libraries/LibWeb/HTML/TraversableNavigable.cpp +++ b/Userland/Libraries/LibWeb/HTML/TraversableNavigable.cpp @@ -381,11 +381,11 @@ static void deactivate_a_document_for_cross_document_navigation(JS::NonnullGCPtr TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_step( int step, bool check_for_cancelation, - Optional source_snapshot_params, + IGNORE_USE_IN_ESCAPING_LAMBDA Optional source_snapshot_params, JS::GCPtr initiator_to_check, Optional user_involvement_for_navigate_events, - Optional navigation_type, - SynchronousNavigation synchronous_navigation) + IGNORE_USE_IN_ESCAPING_LAMBDA Optional navigation_type, + IGNORE_USE_IN_ESCAPING_LAMBDA SynchronousNavigation synchronous_navigation) { auto& vm = this->vm(); // FIXME: 1. Assert: This is running within traversable's session history traversal queue. @@ -438,7 +438,7 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_ auto total_change_jobs = changing_navigables.size(); // 10. Let completedChangeJobs be 0. - size_t completed_change_jobs = 0; + IGNORE_USE_IN_ESCAPING_LAMBDA size_t completed_change_jobs = 0; struct ChangingNavigableContinuationState { JS::Handle displayed_document; @@ -449,7 +449,7 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_ // 11. Let changingNavigableContinuations be an empty queue of changing navigable continuation states. // NOTE: This queue is used to split the operations on changingNavigables into two parts. Specifically, changingNavigableContinuations holds data for the second part. - Queue changing_navigable_continuations; + IGNORE_USE_IN_ESCAPING_LAMBDA Queue changing_navigable_continuations; // 12. For each navigable of changingNavigables, queue a global task on the navigation and traversal task source of navigable's active window to run the steps: for (auto& navigable : changing_navigables) { @@ -705,12 +705,12 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_ auto total_non_changing_jobs = non_changing_navigables_that_still_need_updates.size(); // 16. Let completedNonchangingJobs be 0. - auto completed_non_changing_jobs = 0u; + IGNORE_USE_IN_ESCAPING_LAMBDA auto completed_non_changing_jobs = 0u; // 17. Let (scriptHistoryLength, scriptHistoryIndex) be the result of getting the history object length and index given traversable and targetStep. auto length_and_index = get_the_history_object_length_and_index(target_step); - auto script_history_length = length_and_index.script_history_length; - auto script_history_index = length_and_index.script_history_index; + IGNORE_USE_IN_ESCAPING_LAMBDA auto script_history_length = length_and_index.script_history_length; + IGNORE_USE_IN_ESCAPING_LAMBDA auto script_history_index = length_and_index.script_history_index; // 18. For each navigable of nonchangingNavigablesThatStillNeedUpdates, queue a global task on the navigation and traversal task source given navigable's active window to run the steps: for (auto& navigable : non_changing_navigables_that_still_need_updates) {