mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-06 11:12:54 +00:00
LibWeb: Let queue_a_microtask() take a JS::HeapFunction
This changes the signature of queue_a_microtask() from AK:Function to JS::HeapFunction to be more clear to the user of the functions that this is what is used internally.
This commit is contained in:
parent
76ba374aef
commit
d5c7959c45
Notes:
sideshowbarker
2024-07-17 06:40:21 +09:00
Author: https://github.com/kennethmyhra
Commit: d5c7959c45
Pull-request: https://github.com/SerenityOS/serenity/pull/23950
8 changed files with 22 additions and 21 deletions
|
@ -422,7 +422,7 @@ ErrorOr<void> HTMLImageElement::update_the_image_data(bool restart_animations, b
|
|||
}
|
||||
after_step_7:
|
||||
// 8. Queue a microtask to perform the rest of this algorithm, allowing the task that invoked this algorithm to continue.
|
||||
queue_a_microtask(&document(), [this, restart_animations, maybe_omit_events, previous_url]() mutable {
|
||||
queue_a_microtask(&document(), JS::create_heap_function(this->heap(), [this, restart_animations, maybe_omit_events, previous_url]() mutable {
|
||||
// FIXME: 9. If another instance of this algorithm for this img element was started after this instance
|
||||
// (even if it aborted and is no longer running), then return.
|
||||
|
||||
|
@ -572,7 +572,7 @@ after_step_7:
|
|||
}
|
||||
|
||||
image_request->fetch_image(realm(), request);
|
||||
});
|
||||
}));
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue