LibWeb: Mark local variables captured in GC functions as ignored

These variables are all captured in queued events or other event loop
tasks, but are all guarded by event loop spins later in the function.

The IGNORE_USE_IN_ESCAPING_LAMBDA will soon be required for all locals
that are captured by ref in GC::Function as well as AK::Function.
This commit is contained in:
Andrew Kaster 2024-12-09 19:47:09 -07:00 committed by Andreas Kling
parent 31d21570bf
commit 6ed2bf2bb1
Notes: github-actions[bot] 2024-12-10 06:14:10 +00:00
6 changed files with 17 additions and 16 deletions

View file

@ -280,7 +280,7 @@ void EventSource::announce_the_connection()
// https://html.spec.whatwg.org/multipage/server-sent-events.html#reestablish-the-connection
void EventSource::reestablish_the_connection()
{
bool initial_task_has_run { false };
IGNORE_USE_IN_ESCAPING_LAMBDA bool initial_task_has_run { false };
// 1. Queue a task to run the following steps:
HTML::queue_a_task(HTML::Task::Source::RemoteEvent, nullptr, nullptr, GC::create_function(heap(), [&]() {