-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
os: move process.binding('os') to internalBinding #22292
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
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.
Holding removals until migration is ironed out
Actual code change looks good. |
@briete .. when you get a moment, can you rebase this from master then apply the following patch, which will be necessary for this to proceed Author: James M Snell <jasnell@gmail.com>
Date: Tue Aug 14 19:36:25 2018 -0700
[Squash] add `process.binding('os')` to fallthrough whitelist
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index 08daeb1915..ffae6e4cd9 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -327,7 +327,7 @@
// that are whitelisted for access via process.binding()... this is used
// to provide a transition path for modules that are being moved over to
// internalBinding.
- const internalBindingWhitelist = new SafeSet(['uv']);
+ const internalBindingWhitelist = new SafeSet(['uv', 'os']);
process.binding = function binding(name) {
return internalBindingWhitelist.has(name) ?
internalBinding(name) :
diff --git a/test/parallel/test-process-binding-internalbinding-whitelist.js b/test/parallel/test-process-binding-internalbinding-whitelist.js
index ece967a0b7..cc0119917d 100644
--- a/test/parallel/test-process-binding-internalbinding-whitelist.js
+++ b/test/parallel/test-process-binding-internalbinding-whitelist.js
@@ -7,3 +7,4 @@ const assert = require('assert');
// Assert that whitelisted internalBinding modules are accessible via
// process.binding().
assert(process.binding('uv'));
+assert(process.binding('os')); |
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.
@@ -7,3 +7,4 @@ const assert = require('assert'); | |||
// Assert that whitelisted internalBinding modules are accessible via | |||
// process.binding(). | |||
assert(process.binding('uv')); | |||
assert(process.binding('os')); |
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.
Missing newline at the end.
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.
Thank you. Fixed
@lundibundi I resolved the conflict by rebasing |
@briete could you try to remove all of the non-yours commits from this PR? You will have to either:
Also, I can do the first option for you and just push to your branch (briete:os-internal-binding) if that's fine with you. Unfortunately, I cannot start the CI until this is resolved with whichever method you prefer. |
@lundibundi sorry. I am confused by my first OSS contribution.:sweat: |
@briete I've updated your branch. BE AWARE that the following will remove all your local changes to os-internal-binding branch (those not in github), if you want to keep them you have to use git checkout os-internal-binding
git fetch
git reset --hard origin/os-internal-binding |
|
@lundibundi Thank you. informative.:+1: |
@briete Are you still interested in this PR ? |
@starkwang I'm sorry. Since time has passed since the first PR, close this and make a new PR. |
See #25087 |
see: #22160
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes