-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
src,lib: remove dead process.binding()
code
#25829
Conversation
@@ -33,9 +33,6 @@ enum { | |||
nullptr}; \ | |||
void _register_##modname() { node_module_register(&_module); } | |||
|
|||
#define NODE_BUILTIN_MODULE_CONTEXT_AWARE(modname, regfunc) \ |
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.
🎉
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.
By the way and apropos nothing, node_binding.h includes itself. Accidental change from 13abc6a?
env->ThrowError("Built-in module self-registered."); | ||
return false; | ||
} | ||
CHECK_EQ(mp->nm_flags & NM_F_BUILTIN, 0); |
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.
Maybe invert this to CHECK_EQ(0, mp->nm_flags & ~(NM_F_INTERNAL | NM_F_LINKED))
? That way you can get rid of NM_F_BUILTIN
and it'll also help catch accidental corruption.
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 guess we aren’t introducing new flags too often, but maybe at some point we’ll want to add a new flag in a backwards-compatible way?
Yeah, removed that – thanks for noticing 👍 |
ping @addaleax this needs a rebase |
There are no non-internal builtin modules left, so this should be safe to remove to a large degree.
b14fbcd
to
4602232
Compare
@joyeecheung Thanks for the ping! New CI: https://ci.nodejs.org/job/node-test-pull-request/20526/ |
Landed in 270ffb0 |
There are no non-internal builtin modules left, so this should be safe to remove to a large degree. PR-URL: #25829 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
(I’m adding |
This lands cleanly on v11.x-staging and tests pass but is it safe to land? |
Feel free to land it on staging if the answer is yes. |
There are no non-internal builtin modules left, so this should be safe to remove to a large degree. PR-URL: #25829 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
NODE_BUILTING_MODULE_CONTEXT_AWARE and process.binding are removed in nodejs/node#25829. This changes uses the alternative available without any functionality change.
NODE_BUILTING_MODULE_CONTEXT_AWARE and process.binding are removed in nodejs/node#25829. This changes uses the alternative available without any functionality change.
…17247) * refactor: load electron builtin modules with process._linkedBinding NODE_BUILTING_MODULE_CONTEXT_AWARE and process.binding are removed in nodejs/node#25829. This changes uses the alternative available without any functionality change. * chore: roll node
…17247) * refactor: load electron builtin modules with process._linkedBinding NODE_BUILTING_MODULE_CONTEXT_AWARE and process.binding are removed in nodejs/node#25829. This changes uses the alternative available without any functionality change. * chore: roll node
…17247) * refactor: load electron builtin modules with process._linkedBinding NODE_BUILTING_MODULE_CONTEXT_AWARE and process.binding are removed in nodejs/node#25829. This changes uses the alternative available without any functionality change. * chore: roll node
…17247) * refactor: load electron builtin modules with process._linkedBinding NODE_BUILTING_MODULE_CONTEXT_AWARE and process.binding are removed in nodejs/node#25829. This changes uses the alternative available without any functionality change. * chore: roll node
* fix: backport boringssl patches for node compat * refactor: prevent node macros from overriding base (#17178) * fix: backport boring ssl patch OPENSSL_clear_free * refactor: load electron builtin modules with process._linkedBinding (#17247) * refactor: load electron builtin modules with process._linkedBinding NODE_BUILTING_MODULE_CONTEXT_AWARE and process.binding are removed in nodejs/node#25829. This changes uses the alternative available without any functionality change. * chore: roll node * fix: add boringssl backport to support node upgrade * fix: Update node_includes.h, add DCHECK macros * fix: Update node Debug Options parser usage * fix: Fix asar setup * fix: using v8Util in isolated context * fix: make "process" available in preload scripts * fix: use proper options parser and remove setting of _breakFirstLine _breakFirstLine was being set on the process, but that has changed in node 12 and so is no longer needed. Node will handle it properly when --inspect-brk is provided * fix: process.binding => _linkedBinding in sandboxed isolated preload * chore: update node dep sha * fix: make original-fs work with streams
…lectron#17247) * refactor: load electron builtin modules with process._linkedBinding NODE_BUILTING_MODULE_CONTEXT_AWARE and process.binding are removed in nodejs/node#25829. This changes uses the alternative available without any functionality change. * chore: roll node
There are no non-internal builtin modules left, so this
should be safe to remove to a large degree.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes