GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: register external references in os bindings · nodejs/node@7a8a6de

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_crypto.cc
    • node_external_reference.h
    • node_os.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ namespace node {
3232
using v8::Context;
3333
using v8::Local;
3434
using v8::Object;
35-
using v8::TryCatch;
3635
using v8::Value;
3736

3837
namespace crypto {
Collapse file

‎src/node_external_reference.h‎

Copy file name to clipboardExpand all lines: src/node_external_reference.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class ExternalReferenceRegistry {
6262
V(heap_utils) \
6363
V(messaging) \
6464
V(native_module) \
65+
V(os) \
6566
V(performance) \
6667
V(process_methods) \
6768
V(process_object) \
Collapse file

‎src/node_os.cc‎

Copy file name to clipboardExpand all lines: src/node_os.cc
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
#include "env-inl.h"
23+
#include "node_external_reference.h"
2324
#include "string_bytes.h"
2425

2526
#ifdef __MINGW32__
@@ -398,7 +399,23 @@ void Initialize(Local<Object> target,
398399
Boolean::New(env->isolate(), IsBigEndian())).Check();
399400
}
400401

402+
void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
403+
registry->Register(GetHostname);
404+
registry->Register(GetLoadAvg);
405+
registry->Register(GetUptime);
406+
registry->Register(GetTotalMemory);
407+
registry->Register(GetFreeMemory);
408+
registry->Register(GetCPUInfo);
409+
registry->Register(GetInterfaceAddresses);
410+
registry->Register(GetHomeDirectory);
411+
registry->Register(GetUserInfo);
412+
registry->Register(SetPriority);
413+
registry->Register(GetPriority);
414+
registry->Register(GetOSInformation);
415+
}
416+
401417
} // namespace os
402418
} // namespace node
403419

404420
NODE_MODULE_CONTEXT_AWARE_INTERNAL(os, node::os::Initialize)
421+
NODE_MODULE_EXTERNAL_REFERENCE(os, node::os::RegisterExternalReferences)

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.