-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
lib: move initialization of APIs for changing process state #31172
Conversation
Whether these APIs should be available for Node.js instances semantically depends on whether the current Node.js instance was assigned ownership of process-wide state, and not whether it refers to the main thread or not.
6e65b57
to
c13bb0f
Compare
CI: https://ci.nodejs.org/job/node-test-pull-request/28157/ (:white_check_mark:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a nit
function wrappedUmask(mask) { | ||
// process.umask() is a read-only operation in workers. | ||
if (mask !== undefined) { | ||
throw new ERR_WORKER_UNSUPPORTED_OPERATION('Setting process.umask()'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this reads Setting process.umask() is not supported in workers
, apart from that we need to get rid of the worker part from the message, maybe calling process.umask() as a setter
would be less ambiguous (I thought it was about process.umask = something
from the first glance)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be changed before landing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think so – it’s unrelated to the changes here.
Landed in 20fd123 |
Whether these APIs should be available for Node.js instances semantically depends on whether the current Node.js instance was assigned ownership of process-wide state, and not whether it refers to the main thread or not. PR-URL: #31172 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: David Carlier <[email protected]>
Whether these APIs should be available for Node.js instances semantically depends on whether the current Node.js instance was assigned ownership of process-wide state, and not whether it refers to the main thread or not. PR-URL: #31172 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: David Carlier <[email protected]>
Whether these APIs should be available for Node.js instances semantically depends on whether the current Node.js instance was assigned ownership of process-wide state, and not whether it refers to the main thread or not. PR-URL: #31172 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: David Carlier <[email protected]>
Whether these APIs should be available for Node.js instances semantically depends on whether the current Node.js instance was assigned ownership of process-wide state, and not whether it refers to the main thread or not. PR-URL: #31172 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: David Carlier <[email protected]>
Whether these APIs should be available for Node.js instances semantically depends on whether the current Node.js instance was assigned ownership of process-wide state, and not whether it refers to the main thread or not. PR-URL: #31172 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: David Carlier <[email protected]>
Whether these APIs should be available for Node.js instances
semantically depends on whether the current Node.js instance
was assigned ownership of process-wide state, and not whether
it refers to the main thread or not.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes