node icon indicating copy to clipboard operation
node copied to clipboard

src: iterate over base objects to prepare for snapshot

Open joyeecheung opened this issue 1 year ago • 2 comments

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

joyeecheung avatar Aug 09 '22 18:08 joyeecheung

Review requested:

  • [ ] @nodejs/startup

nodejs-github-bot avatar Aug 09 '22 18:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/45956/

nodejs-github-bot avatar Aug 09 '22 18:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/45969/

nodejs-github-bot avatar Aug 10 '22 12:08 nodejs-github-bot

Landed in 4ca398a6172731c907d41c5440727d0d272f123e

nodejs-github-bot avatar Aug 12 '22 07:08 nodejs-github-bot

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 😊

ruyadorno avatar Aug 22 '22 21:08 ruyadorno

This depends on https://github.com/nodejs/node/pull/43521

joyeecheung avatar Aug 25 '22 15:08 joyeecheung

Sadly 4ca398a6172731c907d41c5440727d0d272f123e is not landing clean in v16.x

juanarbol avatar Sep 29 '22 21:09 juanarbol