mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
V8 GC callbacks do not survive a snapshot, so a `'gc'` PerformanceObserver that was active while building a user-land snapshot received no entries after deserialization, unless another `'gc'` observer was created. When `'gc'` is observed while building a snapshot, add a deserialize callback that registers the GC callbacks again if `'gc'` observers are still active. Assisted-by: OpenCode Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/66097 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>