Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: prefer internal fields in ModuleWrap #34470

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

Use internal fields instead of v8::Globals where possible, since
they generally come with lower overhead and it’s much harder to
introduce memory leaks with them.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Use internal fields instead of `v8::Global`s where possible, since
they generally come with lower overhead and it’s much harder to
introduce memory leaks with them.
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jul 21, 2020
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jul 21, 2020

@addaleax addaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. esm Issues and PRs related to the ECMAScript Modules implementation. labels Jul 21, 2020
Copy link
Member

@devsnek devsnek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i really like this change 👍

@addaleax
Copy link
Member Author

Landed in 83ddb49

@addaleax addaleax closed this Jul 25, 2020
addaleax added a commit that referenced this pull request Jul 25, 2020
Use internal fields instead of `v8::Global`s where possible, since
they generally come with lower overhead and it’s much harder to
introduce memory leaks with them.

PR-URL: #34470
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
@addaleax addaleax deleted the module-wrap-internal-fields branch July 25, 2020 14:52
MylesBorins pushed a commit that referenced this pull request Jul 27, 2020
Use internal fields instead of `v8::Global`s where possible, since
they generally come with lower overhead and it’s much harder to
introduce memory leaks with them.

PR-URL: #34470
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
@ruyadorno ruyadorno mentioned this pull request Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. esm Issues and PRs related to the ECMAScript Modules implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants