mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-14 23:22:52 +00:00
LibWeb: Make EventLoopPlugin::deferred_invoke take a HeapFunction
This commit is contained in:
parent
7487a782db
commit
29cea5bd24
Notes:
github-actions[bot]
2024-10-30 19:57:08 +00:00
Author: https://github.com/shannonbooth
Commit: 29cea5bd24
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2062
Reviewed-by: https://github.com/kalenikaliaksandr ✅
21 changed files with 75 additions and 73 deletions
|
@ -323,7 +323,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> HTMLImageElement::decode(
|
|||
return;
|
||||
|
||||
// 2.2 Otherwise, in parallel wait for one of the following cases to occur, and perform the corresponding actions:
|
||||
Platform::EventLoopPlugin::the().deferred_invoke([this, promise, &realm, reject_if_document_not_fully_active, reject_if_current_request_state_broken] {
|
||||
Platform::EventLoopPlugin::the().deferred_invoke(JS::create_heap_function(heap(), [this, promise, &realm, reject_if_document_not_fully_active, reject_if_current_request_state_broken] {
|
||||
Platform::EventLoopPlugin::the().spin_until(JS::create_heap_function(heap(), [&] {
|
||||
auto state = this->current_request().state();
|
||||
|
||||
|
@ -357,7 +357,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> HTMLImageElement::decode(
|
|||
HTML::TemporaryExecutionContext context(HTML::relevant_settings_object(*this));
|
||||
WebIDL::resolve_promise(realm, promise, JS::js_undefined());
|
||||
}
|
||||
});
|
||||
}));
|
||||
}));
|
||||
|
||||
return promise;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue