node/lib
Joyee Cheung 2a9eb316a1
src: move internal loaders out of bootstrap_node.js
- 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>
2018-03-06 22:12:46 +08:00
..
fs fs: move fs.promises API to fs/promises 2018-02-17 10:15:20 +01:00
internal src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
.eslintrc.yaml lib: add internal check macros 2018-03-05 08:35:44 -06:00
_http_agent.js http: allow _httpMessage to be GC'ed 2018-02-22 14:27:19 +00:00
_http_client.js http: emit timeout duration overflow warning sync 2018-03-04 21:55:21 +00:00
_http_common.js http: simplify checkInvalidHeaderChar 2018-02-16 19:27:28 +01:00
_http_incoming.js http: do not replace .read() in IncomingMessage 2018-02-27 12:26:40 +01:00
_http_outgoing.js http: OutgoingMessage.end() should return this 2018-02-19 08:59:32 +01:00
_http_server.js src: Remove lttng support. 2018-03-01 16:44:43 +00:00
_stream_duplex.js stream: updated streams error handling 2018-03-06 13:31:56 +01:00
_stream_passthrough.js
_stream_readable.js stream: updated streams error handling 2018-03-06 13:31:56 +01:00
_stream_transform.js stream: updated streams error handling 2018-03-06 13:31:56 +01:00
_stream_wrap.js
_stream_writable.js stream: updated streams error handling 2018-03-06 13:31:56 +01:00
_tls_common.js
_tls_wrap.js tls: better error message for socket disconnect 2018-03-04 12:43:13 +01:00
assert.js src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
async_hooks.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
buffer.js src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
child_process.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
cluster.js
console.js console: port errors to new system 2018-02-22 13:36:22 +00:00
constants.js
crypto.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
dgram.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
dns.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
domain.js src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
events.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
fs.js stream: updated streams error handling 2018-03-06 13:31:56 +01:00
http.js
http2.js
https.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
inspector.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
module.js src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
net.js stream: updated streams error handling 2018-03-06 13:31:56 +01:00
os.js lib,src: audit process.env in lib/ for setuid binary 2018-02-16 17:42:21 +01:00
path.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
perf_hooks.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
process.js
punycode.js
querystring.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
readline.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
repl.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
stream.js
string_decoder.js src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
sys.js
timers.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
tls.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
tty.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
url.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
util.js src: move internal loaders out of bootstrap_node.js 2018-03-06 22:12:46 +08:00
v8.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
vm.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
zlib.js stream: updated streams error handling 2018-03-06 13:31:56 +01:00