mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-18 16:21:52 +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
|
@ -505,9 +505,9 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<ClassicScript>> fetch_a_classic_worker_impo
|
|||
|
||||
// 5. Pause until response is not null.
|
||||
auto& event_loop = settings_object.responsible_event_loop();
|
||||
event_loop.spin_until([&]() {
|
||||
event_loop.spin_until(JS::create_heap_function(vm.heap(), [&]() -> bool {
|
||||
return response;
|
||||
});
|
||||
}));
|
||||
|
||||
// 6. Set response to response's unsafe response.
|
||||
response = response->unsafe_response();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue