Please sign in to comment.
src: prepare platform for upstream V8 changes
V8 platform tasks may schedule other tasks (both background and foreground), and may perform asynchronous operations like resolving Promises. To address that: - Run the task queue drain call inside a callback scope. This makes sure asynchronous operations inside it, like resolving promises, lead to the microtask queue and any subsequent operations not being silently forgotten. - Move the task queue drain call before `EmitBeforeExit()` and only run `EmitBeforeExit()` if there is no new event loop work. - Account for possible new foreground tasks scheduled by background tasks in `DrainBackgroundTasks()`. PR-URL: #15428 Reviewed-By: Franziska Hinkelmann <firstname.lastname@example.org> Reviewed-By: James M Snell <email@example.com> Reviewed-By: Ben Noordhuis <firstname.lastname@example.org> Reviewed-By: Matthew Loring <email@example.com>
- Loading branch information...
Showing with 69 additions and 37 deletions.