GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cluster: use ObjectPrototypeHasOwnProperty by daeyeon · Pull Request #48141 · nodejs/node

Conversation

@daeyeon

@daeyeon daeyeon commented May 23, 2023

Copy link
Copy Markdown
Member

This addresses: #48077 (comment)

Signed-off-by: Daeyeon Jeong [email protected]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@daeyeon
cluster: use ObjectPrototypeHasOwnProperty
83c4b73
Signed-off-by: Daeyeon Jeong <[email protected]>
@nodejs-github-bot nodejs-github-bot added cluster Issues and PRs related to the cluster subsystem. needs-ci PRs that need a full CI run. labels May 23, 2023
@Trott Trott added request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. and removed request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels May 23, 2023
@Trott

Trott commented May 23, 2023

Copy link
Copy Markdown
Member

Should we add a test that modifies the prototype chain? (I generally prefer to add tests, but I can also see an argument that it might be a bit much to always add tests for primordials. I guess I'd prefer a test be added, but not so strongly that I'd block this landing without a test.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anonrig

anonrig commented May 24, 2023

Copy link
Copy Markdown
Member

I'm +1 on adding tests as well.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon

daeyeon commented May 24, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

On second thought as I added the test, I think that the builtin doesn't prevent changes to the process.env prototype. Closing as we don't have a clue it needs to be applied to cluster only. Thanks for the review!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon daeyeon closed this May 24, 2023
@daeyeon
daeyeon deleted the main.has-own-230523.Tue.862f branch May 24, 2023 00:53
@Trott

Trott commented May 24, 2023

Copy link
Copy Markdown
Member

On second thought as I added the test, I think that the builtin doesn't prevent changes to the process.env prototype. Closing as we don't have a clue it needs to be applied to cluster only. Thanks for the review!

We can't avoid changes to process.env prototype, but we can avoid those prototype changes affecting the behavior of the cluster module and other modules. That's what this is about, right? I think we should re-open this.

anonrig reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon
fixup! cluster: use ObjectPrototypeHasOwnProperty
5f04200
Signed-off-by: Daeyeon Jeong <[email protected]>
@daeyeon
daeyeon restored the main.has-own-230523.Tue.862f branch May 25, 2023 09:11
@daeyeon daeyeon reopened this May 25, 2023
@daeyeon

daeyeon commented May 25, 2023

Copy link
Copy Markdown
Member Author

Yes, that's right. This way is safer, but I thought there might be a reason why the properties of process.env are just used in the other builtin modules. Maybe I was overly concerned.. Re-opened this with a test. PTAL.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon daeyeon added commit-queue-squash PRs the Commit Queue should land as one squashed commit. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels May 25, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 25, 2023
@nodejs-github-bot

nodejs-github-bot commented May 25, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott
Trott approved these changes May 25, 2023
View reviewed changes
@Trott

Trott commented May 25, 2023

Copy link
Copy Markdown
Member

This way is safer, but I thought there might be a reason why the properties of process.env are just used in the other builtin modules.

It's possible that there would be significant negative performance implications in some hot paths, but I don't think this is one of those.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

anonrig
anonrig approved these changes May 25, 2023
View reviewed changes
@anonrig anonrig added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels May 25, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label May 25, 2023
@nodejs-github-bot
nodejs-github-bot merged commit b4d5f1f into nodejs:main May 25, 2023
@nodejs-github-bot

nodejs-github-bot commented May 25, 2023

Copy link
Copy Markdown
Collaborator

Landed in b4d5f1f

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon
daeyeon deleted the main.has-own-230523.Tue.862f branch May 26, 2023 04:24
targos pushed a commit that referenced this pull request May 30, 2023
@daeyeon @targos
cluster: use ObjectPrototypeHasOwnProperty
6cf2adc
Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: #48141
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
@targos targos mentioned this pull request Jun 4, 2023
v20.3.0 release proposal #48332
Merged
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
@daeyeon @danielleadams
cluster: use ObjectPrototypeHasOwnProperty
1b248f3
Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: #48141
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
@daeyeon @MoLow
cluster: use ObjectPrototypeHasOwnProperty
7692d2e
Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: nodejs#48141
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
@danielleadams danielleadams mentioned this pull request Jul 10, 2023
v18.17.0 release proposal #48694
Merged
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
@daeyeon @Ceres6
cluster: use ObjectPrototypeHasOwnProperty
da080a8
Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: nodejs#48141
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
@daeyeon @Ceres6
cluster: use ObjectPrototypeHasOwnProperty
167fb56
Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: nodejs#48141
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Trott Trott Trott approved these changes
@anonrig anonrig anonrig approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. cluster Issues and PRs related to the cluster subsystem. commit-queue-squash PRs the Commit Queue should land as one squashed commit. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@daeyeon @Trott @anonrig @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.