mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Remove some uses of [&] lambda captures for queued tasks
Using a default reference capture for these kinds of tasks is dangerous and prone to error. Some of the variables should for sure be captured by value so that we can keep a GC object alive rather than trying to refer to stack objects.
This commit is contained in:
committed by
Andreas Kling
parent
6ed2bf2bb1
commit
66519af43f
@@ -890,7 +890,7 @@ static WebIDL::ExceptionOr<Navigable::NavigationParamsVariant> create_navigation
|
||||
}
|
||||
|
||||
// 7. Wait until either response is non-null, or navigable's ongoing navigation changes to no longer equal navigationId.
|
||||
HTML::main_thread_event_loop().spin_until(GC::create_function(vm.heap(), [&]() {
|
||||
HTML::main_thread_event_loop().spin_until(GC::create_function(vm.heap(), [navigation_id, navigable, response_holder]() {
|
||||
if (response_holder->response() != nullptr)
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user