node
node copied to clipboard
src: create BaseObject with node::Realm
BaseObjects are wrappers around JS objects. These objects should be created in a node::Realm and destroyed when their associated realm is cleaning up.
BaseObjects created in a realm should also be serialized associated to that realm when creating the startup snapshot.
Refs: https://github.com/nodejs/node/issues/42528
Review requested:
- [ ] @nodejs/gyp
- [ ] @nodejs/startup
Extracted CleanupHooksCallback refactoring to https://github.com/nodejs/node/pull/44379.
Rebased and resolved conflicts.
CI: https://ci.nodejs.org/job/node-test-pull-request/46571/
CI: https://ci.nodejs.org/job/node-test-pull-request/46817/
CI: https://ci.nodejs.org/job/node-test-pull-request/46822/
CI: https://ci.nodejs.org/job/node-test-pull-request/46826/
CI: https://ci.nodejs.org/job/node-test-pull-request/46855/
Landed in 717465433c58. Thank you for the review!
This depends on https://github.com/nodejs/node/pull/44179; marking this a backport-blocked for the v16.x release branch.
Hi @legendecas, do you mind backporting this to v18.x-staging? Thank you.
@danielleadams I think it's already there 6878448 since the previous release.
@RafaelGSS https://github.com/nodejs/node/commit/687844822fb79da820325e572a59cd76b39854d1 is not the commit of this PR. It's https://github.com/nodejs/node/pull/44379. The commit is referencing this PR :p
@danielleadams yeah, I can submit a backport to v18.
@danielleadams just realized that https://github.com/nodejs/node/pull/44348#issuecomment-1266268937 mentioned this depends on https://github.com/nodejs/node/pull/44179. I'm marking this as backport-blocked-v18.x the same as v16 backporting.