node icon indicating copy to clipboard operation
node copied to clipboard

src: create BaseObject with node::Realm

Open legendecas opened this issue 1 year ago • 4 comments

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

legendecas avatar Aug 22 '22 17:08 legendecas

Review requested:

  • [ ] @nodejs/gyp
  • [ ] @nodejs/startup

nodejs-github-bot avatar Aug 22 '22 17:08 nodejs-github-bot

Extracted CleanupHooksCallback refactoring to https://github.com/nodejs/node/pull/44379.

legendecas avatar Aug 25 '22 03:08 legendecas

Rebased and resolved conflicts.

legendecas avatar Sep 14 '22 02:09 legendecas

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

nodejs-github-bot avatar Sep 14 '22 02:09 nodejs-github-bot

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

nodejs-github-bot avatar Sep 26 '22 12:09 nodejs-github-bot

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

nodejs-github-bot avatar Sep 26 '22 15:09 nodejs-github-bot

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

nodejs-github-bot avatar Sep 26 '22 17:09 nodejs-github-bot

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

nodejs-github-bot avatar Sep 27 '22 07:09 nodejs-github-bot

Landed in 717465433c58. Thank you for the review!

legendecas avatar Sep 27 '22 08:09 legendecas

This depends on https://github.com/nodejs/node/pull/44179; marking this a backport-blocked for the v16.x release branch.

juanarbol avatar Oct 04 '22 00:10 juanarbol

Hi @legendecas, do you mind backporting this to v18.x-staging? Thank you.

danielleadams avatar Oct 05 '22 11:10 danielleadams

@danielleadams I think it's already there 6878448 since the previous release.

RafaelGSS avatar Oct 05 '22 13:10 RafaelGSS

@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.

legendecas avatar Oct 05 '22 16:10 legendecas

@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.

legendecas avatar Oct 07 '22 16:10 legendecas