aboutsummaryrefslogtreecommitdiff
path: root/src/uv.cc
diff options
context:
space:
mode:
authorYihong Wang <yh.wang@ibm.com>2017-10-21 23:16:50 -0700
committerGibson Fahnestock <gibfahn@gmail.com>2017-11-13 23:17:34 +0000
commit8680bb9f1a0163cfbdc4443c1eb2b56c5e443616 (patch)
tree16d97c77379adba2d45dc17787f314b9e3cb1b1b /src/uv.cc
parent21a7459d490d832d5d547833d527083e460999e1 (diff)
downloadandroid-node-v8-8680bb9f1a0163cfbdc4443c1eb2b56c5e443616.tar.gz
android-node-v8-8680bb9f1a0163cfbdc4443c1eb2b56c5e443616.tar.bz2
android-node-v8-8680bb9f1a0163cfbdc4443c1eb2b56c5e443616.zip
src: explicitly register built-in modules
Previously, built-in modules are registered before main() via __attribute__((constructor)) mechanism in GCC and similiar mechanism in MSVC. This causes some issues when node is built as static library. Calling module registration function for built-in modules in node::Init() helps to avoid the issues. Signed-off-by: Yihong Wang <yh.wang@ibm.com> PR-URL: https://github.com/nodejs/node/pull/16565 Refs: https://github.com/nodejs/node/pull/14986#issuecomment-332758206 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/uv.cc')
-rw-r--r--src/uv.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/uv.cc b/src/uv.cc
index a13a0430c1..f70da1baae 100644
--- a/src/uv.cc
+++ b/src/uv.cc
@@ -21,6 +21,7 @@
#include "uv.h"
#include "node.h"
+#include "node_internals.h"
#include "env-inl.h"
namespace node {
@@ -58,4 +59,4 @@ void InitializeUV(Local<Object> target,
} // anonymous namespace
} // namespace node
-NODE_MODULE_CONTEXT_AWARE_BUILTIN(uv, node::InitializeUV)
+NODE_BUILTIN_MODULE_CONTEXT_AWARE(uv, node::InitializeUV)