summaryrefslogtreecommitdiff
path: root/src/node.h
diff options
context:
space:
mode:
authorBradley Farias <bradley.meck@gmail.com>2017-10-03 10:07:48 -0500
committerBradley Farias <bradley.meck@gmail.com>2017-10-12 09:13:29 -0500
commita36aa049c857d87580548d096743f0acf28d231b (patch)
treea24545ea69d8d1d859893eddd1623ffe67a685d7 /src/node.h
parent75d41cf531c19496c854acf65d48d9c8421907bc (diff)
downloadandroid-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/node.h')
-rw-r--r--src/node.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/node.h b/src/node.h
index 287823b17b..aa8738a567 100644
--- a/src/node.h
+++ b/src/node.h
@@ -421,8 +421,9 @@ typedef void (*addon_context_register_func)(
v8::Local<v8::Context> context,
void* priv);
-#define NM_F_BUILTIN 0x01
-#define NM_F_LINKED 0x02
+#define NM_F_BUILTIN 0x01
+#define NM_F_LINKED 0x02
+#define NM_F_INTERNAL 0x04
struct node_module {
int nm_version;
@@ -436,9 +437,6 @@ struct node_module {
struct node_module* nm_link;
};
-node_module* get_builtin_module(const char *name);
-node_module* get_linked_module(const char *name);
-
extern "C" NODE_EXTERN void node_module_register(void* mod);
#ifdef _WIN32