mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
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:
committed by
Andreas Kling
parent
31d21570bf
commit
6ed2bf2bb1
@@ -3470,7 +3470,7 @@ void Document::destroy_a_document_and_its_descendants(GC::Ptr<GC::Function<void(
|
||||
}
|
||||
|
||||
// 2. Let childNavigables be document's child navigables.
|
||||
auto child_navigables = document_tree_child_navigables();
|
||||
IGNORE_USE_IN_ESCAPING_LAMBDA auto child_navigables = document_tree_child_navigables();
|
||||
|
||||
// 3. Let numberDestroyed be 0.
|
||||
IGNORE_USE_IN_ESCAPING_LAMBDA size_t number_destroyed = 0;
|
||||
@@ -3698,7 +3698,7 @@ void Document::unload_a_document_and_its_descendants(GC::Ptr<Document> new_docum
|
||||
descendant_navigables.append(other_navigable);
|
||||
}
|
||||
|
||||
auto unloaded_documents_count = descendant_navigables.size() + 1;
|
||||
IGNORE_USE_IN_ESCAPING_LAMBDA auto unloaded_documents_count = descendant_navigables.size() + 1;
|
||||
|
||||
HTML::queue_global_task(HTML::Task::Source::NavigationAndTraversal, HTML::relevant_global_object(*this), GC::create_function(heap(), [&number_unloaded, this, new_document] {
|
||||
unload(new_document);
|
||||
|
||||
Reference in New Issue
Block a user