diff --git a/src/node_external_reference.h b/src/node_external_reference.h index 7da15290a15e67..445ca19f3fbcf2 100644 --- a/src/node_external_reference.h +++ b/src/node_external_reference.h @@ -62,6 +62,7 @@ class ExternalReferenceRegistry { V(heap_utils) \ V(messaging) \ V(native_module) \ + V(os) \ V(performance) \ V(process_methods) \ V(process_object) \ diff --git a/src/node_os.cc b/src/node_os.cc index 2bbb56aabfcb83..cd340db6254bd0 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -398,7 +398,23 @@ void Initialize(Local target, Boolean::New(env->isolate(), IsBigEndian())).Check(); } +void RegisterExternalReferences(ExternalReferenceRegistry* registry) { + registry->Register(GetHostname); + registry->Register(GetLoadAvg); + registry->Register(GetUptime); + registry->Register(GetTotalMemory); + registry->Register(GetFreeMemory); + registry->Register(GetCPUInfo); + registry->Register(GetInterfaceAddresses); + registry->Register(GetHomeDirectory); + registry->Register(GetUserInfo); + registry->Register(SetPriority); + registry->Register(GetPriority); + registry->Register(GetOSInformation); +} + } // namespace os } // namespace node NODE_MODULE_CONTEXT_AWARE_INTERNAL(os, node::os::Initialize) +NODE_MODULE_EXTERNAL_REFERENCE(os, node::os::RegisterExternalReferences)