mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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:
parent
6ed2bf2bb1
commit
66519af43f
Notes:
github-actions[bot]
2024-12-10 06:14:03 +00:00
Author: https://github.com/ADKaster
Commit: 66519af43f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2860
4 changed files with 10 additions and 10 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue