Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: drain platform tasks before creating startup snapshot
Drain the loop and platform tasks before creating a snapshot. This is necessary to ensure that the no roots are held by the the platform tasks, which may reference objects associated with a context. For example, a WeakRef may schedule an per-isolate platform task as a GC root, and referencing an object in a context, causing an assertion in the snapshot creator. PR-URL: nodejs#56403 Refs: nodejs#56292 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
- Loading branch information