mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 01:38:52 +00:00
LibWeb/FileAPI: Use HTML EventLoop to wait for promise to be fulfilled
Which will have proper handling of the exection context when performing a microtask checkpoint. This fixes an assertion to be added in the next commit where perform_a_microtask_check is invoked on a non-empty execution context stack.
This commit is contained in:
parent
01f8ab35f1
commit
2fb4fcf4a0
Notes:
github-actions[bot]
2025-01-03 10:00:31 +00:00
Author: https://github.com/shannonbooth
Commit: 2fb4fcf4a0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3109
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ WebIDL::ExceptionOr<void> FileReader::read_operation(Blob& blob, Type type, Opti
|
|||
|
||||
// 1. Wait for chunkPromise to be fulfilled or rejected.
|
||||
// FIXME: Create spec issue to use WebIDL react to promise steps here instead of this custom logic
|
||||
Platform::EventLoopPlugin::the().spin_until(GC::create_function(heap(), [promise]() {
|
||||
HTML::main_thread_event_loop().spin_until(GC::create_function(heap(), [promise]() {
|
||||
return promise->state() == JS::Promise::State::Fulfilled || promise->state() == JS::Promise::State::Rejected;
|
||||
}));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue