mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
LibWeb: Port EventLoop::spin_XXX to HeapFunction
This commit is contained in:
parent
29cea5bd24
commit
1c18b900e2
Notes:
github-actions[bot]
2024-10-30 19:57:02 +00:00
Author: https://github.com/shannonbooth
Commit: 1c18b900e2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2062
Reviewed-by: https://github.com/kalenikaliaksandr ✅
14 changed files with 68 additions and 65 deletions
|
@ -883,7 +883,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([&]() {
|
||||
HTML::main_thread_event_loop().spin_until(JS::create_heap_function(vm.heap(), [&]() {
|
||||
if (response_holder->response() != nullptr)
|
||||
return true;
|
||||
|
||||
|
@ -891,7 +891,7 @@ static WebIDL::ExceptionOr<Navigable::NavigationParamsVariant> create_navigation
|
|||
return true;
|
||||
|
||||
return false;
|
||||
});
|
||||
}));
|
||||
// If the latter condition occurs, then abort fetchController, and return. Otherwise, proceed onward.
|
||||
if (navigation_id.has_value() && (!navigable->ongoing_navigation().has<String>() || navigable->ongoing_navigation().get<String>() != *navigation_id)) {
|
||||
fetch_controller->abort(realm, {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue