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
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/node_crypto.cc -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -32,7 +32,6 @@ namespace node { |
32 | 32 | using v8::Context; |
33 | 33 | using v8::Local; |
34 | 34 | using v8::Object; |
35 | | -using v8::TryCatch; |
36 | 35 | using v8::Value; |
37 | 36 |
|
38 | 37 | namespace crypto { |
|
Collapse file
Copy file name to clipboardExpand all lines: src/node_external_reference.h +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -62,6 +62,7 @@ class ExternalReferenceRegistry { |
62 | 62 | V(heap_utils) \ |
63 | 63 | V(messaging) \ |
64 | 64 | V(native_module) \ |
| 65 | + V(os) \ |
65 | 66 | V(performance) \ |
66 | 67 | V(process_methods) \ |
67 | 68 | V(process_object) \ |
|
Collapse file
Copy file name to clipboardExpand all lines: src/node_os.cc +17Lines changed: 17 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
20 | 20 | // USE OR OTHER DEALINGS IN THE SOFTWARE. |
21 | 21 |
|
22 | 22 | #include "env-inl.h" |
| 23 | +#include "node_external_reference.h" |
23 | 24 | #include "string_bytes.h" |
24 | 25 |
|
25 | 26 | #ifdef __MINGW32__ |
@@ -398,7 +399,23 @@ void Initialize(Local<Object> target, |
398 | 399 | Boolean::New(env->isolate(), IsBigEndian())).Check(); |
399 | 400 | } |
400 | 401 |
|
| 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 | + |
401 | 417 | } // namespace os |
402 | 418 | } // namespace node |
403 | 419 |
|
404 | 420 | NODE_MODULE_CONTEXT_AWARE_INTERNAL(os, node::os::Initialize) |
| 421 | +NODE_MODULE_EXTERNAL_REFERENCE(os, node::os::RegisterExternalReferences) |