Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
cluster: use ObjectPrototypeHasOwnProperty#48141
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
cluster: use ObjectPrototypeHasOwnProperty #48141
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Signed-off-by: Daeyeon Jeong <[email protected]>
Trott commented May 23, 2023
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.) |
anonrig commented May 24, 2023
I'm +1 on adding tests as well. |
daeyeon commented May 24, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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! |
Trott commented May 24, 2023
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. |
Signed-off-by: Daeyeon Jeong <[email protected]>
daeyeon commented May 25, 2023
Yes, that's right. This way is safer, but I thought there might be a reason why the properties of |
nodejs-github-bot commented May 25, 2023
Trott commented May 25, 2023
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. |
nodejs-github-bot commented May 25, 2023
Landed in b4d5f1f |
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: nodejs#48141 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #48141 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #48141 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: nodejs#48141 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: nodejs#48141 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: nodejs#48141 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
This addresses: #48077 (comment)
Signed-off-by: Daeyeon Jeong [email protected]