node
node copied to clipboard
src: iterate over base objects to prepare for snapshot
Instead of iterating over the bindings, iterate over the base objects that are snapshottable. This allows us to snapshot base objects that are not bindings. In addition this refactors the InternalFieldInfo class to eliminate potential undefined behaviors, and renames it to InternalFieldInfoBase. The {de}serialize callbacks now expect a InternalFieldInfo struct nested in Snapshotable classes that can be used to carry serialization data around. This allows us to create structs inheriting from InternalFieldInfo for Snapshotable objects that need custom fields.
Refs: https://github.com/nodejs/node/issues/37476
Review requested:
- [ ] @nodejs/startup
CI: https://ci.nodejs.org/job/node-test-pull-request/45956/
CI: https://ci.nodejs.org/job/node-test-pull-request/45969/
Landed in 4ca398a6172731c907d41c5440727d0d272f123e
hi @joyeecheung, unfortunately https://github.com/nodejs/node/commit/4ca398a6172731c907d41c5440727d0d272f123e is not landing cleanly in the updated v18.x-staging
branch.
This PR will need to be backported in order to land in a v18.x release 😊
This depends on https://github.com/nodejs/node/pull/43521
Sadly 4ca398a6172731c907d41c5440727d0d272f123e is not landing clean in v16.x