Uh oh!
There was an error while loading. Please reload this page.
cluster: use ObjectPrototypeHasOwnProperty - #48141
Conversation
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
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. |
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 <daeyeon.dev@gmail.com>
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 <daeyeon.dev@gmail.com> PR-URL: #48141 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #48141 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: nodejs#48141 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: nodejs#48141 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: nodejs#48141 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This addresses: #48077 (comment)
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com