mirror of https://github.com/nodejs/node.git
2a9eb316a1
- Moves the creation of `process.binding()`, `process._linkedBinding()` `internalBinding()` and `NativeModule` into a separate file `lib/internal/bootstrap_loaders.js`, and documents them there. This file will be compiled and run before `bootstrap_node.js`, which means we now bootstrap the internal module & binding system before actually bootstrapping Node.js. - Rename the special ID that can be used to require `NativeModule` as `internal/bootstrap_loaders` since it is setup there. Also put `internalBinding` in the object exported by `NativeModule.require` instead of putting it inside the `NativeModule.wrapper` - Use the original `getBinding()` to get the source code of native modules instead of getting it from `process.binding('native')` so that users cannot fake native modules by modifying the binding object. - Names the bootstrapping functions so their names show up in the stack trace. PR-URL: https://github.com/nodejs/node/pull/19112 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> |
||
---|---|---|
.. | ||
cluster | ||
crypto | ||
http2 | ||
loader | ||
process | ||
repl | ||
streams | ||
test | ||
util | ||
vm | ||
async_hooks.js | ||
bootstrap_loaders.js | ||
bootstrap_node.js | ||
buffer.js | ||
child_process.js | ||
constants.js | ||
encoding.js | ||
errors.js | ||
freelist.js | ||
fs.js | ||
http.js | ||
inspector_async_hook.js | ||
linkedlist.js | ||
module.js | ||
net.js | ||
os.js | ||
process.js | ||
querystring.js | ||
readline.js | ||
readme.md | ||
repl.js | ||
safe_globals.js | ||
socket_list.js | ||
timers.js | ||
tls.js | ||
trace_events_async_hooks.js | ||
url.js | ||
util.js | ||
v8.js | ||
v8_prof_polyfill.js | ||
v8_prof_processor.js | ||
wrap_js_stream.js |
readme.md
Internal Modules
The modules in lib/internal
are intended for internal use in Node.js core
only, and are not accessible with require()
from user modules. These are
subject to change at any time. Reliance on these modules outside of core
is not supported in any way.