mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +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:
parent
31d21570bf
commit
6ed2bf2bb1
Notes:
github-actions[bot]
2024-12-10 06:14:10 +00:00
Author: https://github.com/ADKaster
Commit: 6ed2bf2bb1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2860
6 changed files with 17 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue