diff options
author | Bradley Farias <bradley.meck@gmail.com> | 2017-10-03 10:07:48 -0500 |
---|---|---|
committer | Bradley Farias <bradley.meck@gmail.com> | 2017-10-12 09:13:29 -0500 |
commit | a36aa049c857d87580548d096743f0acf28d231b (patch) | |
tree | a24545ea69d8d1d859893eddd1623ffe67a685d7 /src/module_wrap.cc | |
parent | 75d41cf531c19496c854acf65d48d9c8421907bc (diff) | |
download | android-node-v8-a36aa049c857d87580548d096743f0acf28d231b.tar.gz android-node-v8-a36aa049c857d87580548d096743f0acf28d231b.tar.bz2 android-node-v8-a36aa049c857d87580548d096743f0acf28d231b.zip |
src: add internalBindings for binding isolation
This commit adds a method to internal/process that allows access to
bindings that are not intended to be used by user code. It has a
separate cache object and modlist in order to avoid collisions.
You can use NODE_MODULE_CONTEXT_AWARE_INTERNAL to register a C++
module as an internal.
PR-URL: https://github.com/nodejs/node/pull/15759
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'src/module_wrap.cc')
-rw-r--r-- | src/module_wrap.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/module_wrap.cc b/src/module_wrap.cc index cbee6faff3..829248b681 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -7,6 +7,7 @@ #include "node_url.h" #include "util.h" #include "util-inl.h" +#include "node_internals.h" namespace node { namespace loader { @@ -523,5 +524,5 @@ void ModuleWrap::Initialize(Local<Object> target, } // namespace loader } // namespace node -NODE_MODULE_CONTEXT_AWARE_BUILTIN(module_wrap, - node::loader::ModuleWrap::Initialize) +NODE_MODULE_CONTEXT_AWARE_INTERNAL(module_wrap, + node::loader::ModuleWrap::Initialize) |