mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
- 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.
Backport-PR-URL: https://github.com/nodejs/node/pull/19374
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>
|
||
|---|---|---|
| .. | ||
| bootstrap | ||
| configure.d | ||
| doc | ||
| eslint-rules | ||
| gyp | ||
| icu | ||
| macos-installer | ||
| msvs | ||
| node_modules | ||
| pkgsrc | ||
| remark-cli | ||
| remark-preset-lint-node | ||
| rpm | ||
| .eslintrc.yaml | ||
| certdata.txt | ||
| check_macros.py | ||
| check-imports.py | ||
| compress_json.py | ||
| cpplint.py | ||
| create_android_makefiles | ||
| create_expfile.sh | ||
| dcheck_macros.py | ||
| genv8constants.py | ||
| getmoduleversion.py | ||
| getnodeversion.py | ||
| gyp_node.py | ||
| install.py | ||
| js2c.py | ||
| license-builder.sh | ||
| license2rtf.js | ||
| lint-js.js | ||
| lsan_suppressions.txt | ||
| macosx-firewall.sh | ||
| make-v8.sh | ||
| Makefile | ||
| mk-ca-bundle.pl | ||
| mkssldef.py | ||
| nodcheck_macros.py | ||
| osx-codesign.sh | ||
| osx-pkg-postinstall.sh | ||
| osx-productsign.sh | ||
| release.sh | ||
| run-valgrind.py | ||
| sign.bat | ||
| specialize_node_d.py | ||
| test-npm-package.js | ||
| test-v8.bat | ||
| test.py | ||
| update-authors.sh | ||
| update-babel-eslint.sh | ||
| update-eslint.sh | ||
| utils.py | ||