FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: simplify exit code accesses by daeyeon · Pull Request #45125 · nodejs/node · GitHub

/ node Public

src: simplify exit code accesses - #45125

Merged
nodejs-github-bot merged 8 commits into
nodejs:mainfrom
daeyeon:main.exitcode-with-accessors-221022.Sat.fefa
Nov 10, 2022
Merged

src: simplify exit code accesses#45125
nodejs-github-bot merged 8 commits into
nodejs:mainfrom
daeyeon:main.exitcode-with-accessors-221022.Sat.fefa

Conversation

daeyeon commented Oct 22, 2022

Copy link
Copy Markdown
Member

This simplifies getting the exit code which is set through process.exitCode by removing
manually reading the JS property from the native side.

Addresses this TODO:

node/src/api/hooks.cc

Lines 72 to 75 in 5815e3e

// TODO(addaleax): It might be nice to share process.exitCode via
// getter/setter pairs that pass data directly to the native side, so that we
// don't manually have to read and write JS properties here. These getters
// could use e.g. a typed array for performance.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/startup

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Oct 22, 2022
daeyeon added the process Issues and PRs related to the process subsystem. label Oct 22, 2022

daeyeon commented Oct 22, 2022

Copy link
Copy Markdown
Member Author

/cc @addaleax @nodejs/cpp-reviewers

daeyeon force-pushed the main.exitcode-with-accessors-221022.Sat.fefa branch from bd891da to a107886 Compare October 22, 2022 12:04
This simplifies getting the exit code which is set through
`process.exitCode` by removing manually reading the JS property
from the native side.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
daeyeon force-pushed the main.exitcode-with-accessors-221022.Sat.fefa branch from a107886 to eef1c86 Compare October 22, 2022 12:13
Comment thread src/node_process_object.cc Outdated
Comment thread src/env_properties.h Outdated
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>

daeyeon commented Oct 29, 2022

Copy link
Copy Markdown
Member Author

Changed the previous commit to use a typed array. PTAL.

daeyeon added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Oct 29, 2022

RaisinTen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM!

daeyeon added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 31, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 31, 2022

This comment was marked as outdated.

Comment thread src/env.h Outdated
daeyeon force-pushed the main.exitcode-with-accessors-221022.Sat.fefa branch from 204ca1e to 3a854d1 Compare November 4, 2022 15:31

daeyeon commented Nov 4, 2022

Copy link
Copy Markdown
Member Author

Updated by removing the new struct in the previous commit and extending the exiting_ buffer. The exiting_ is renamed to exit_info_. PTAL.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
daeyeon force-pushed the main.exitcode-with-accessors-221022.Sat.fefa branch from 3a854d1 to 62819b1 Compare November 4, 2022 15:45
Comment thread src/env.h Outdated
Comment thread lib/internal/bootstrap/node.js Outdated
Comment thread src/env-inl.h Outdated
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>

daeyeon commented Nov 5, 2022

Copy link
Copy Markdown
Member Author

Applied the suggestions. PTAL.

Comment thread src/env.h Outdated
Comment thread src/env.cc Outdated
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>

joyeecheung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for. the patience!

daeyeon added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 9, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 9, 2022

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

daeyeon commented Nov 9, 2022

Copy link
Copy Markdown
Member Author

Fixed the CI failure. PTAL again. Thanks!

Copy link
Copy Markdown
Collaborator

joyeecheung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Still LGTM, thanks

Copy link
Copy Markdown
Collaborator

daeyeon added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Nov 9, 2022
daeyeon added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 10, 2022
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 10, 2022
nodejs-github-bot merged commit 7b1e153 into nodejs:main Nov 10, 2022

Copy link
Copy Markdown
Collaborator

Landed in 7b1e153

daeyeon deleted the main.exitcode-with-accessors-221022.Sat.fefa branch November 10, 2022 01:11

Copy link
Copy Markdown
Member

Hi @daeyeon. I tried to include this commit to the v19.1.0 proposal, but I got some conflicts. Could you please open a backport PR?

daeyeon commented Nov 11, 2022

Copy link
Copy Markdown
Member Author

Hi @RafaelGSS. Sure, I will open it.

daeyeon commented Nov 11, 2022

Copy link
Copy Markdown
Member Author

@RafaelGSS Come to think of it, this requires 2d0d997. Since it's a semver-major change, I think it's right not to land this PR to v19.x.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL