GeezerVison is showing github.com — src: simplify uptime and ppid return values · nodejs/node@28a1cc1
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_process.cc +2-3Lines changed: 2 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -54,7 +54,6 @@ using v8::Integer; |
54 | 54 | using v8::Isolate; |
55 | 55 | using v8::Local; |
56 | 56 | using v8::Name; |
57 | | -using v8::Number; |
58 | 57 | using v8::PropertyCallbackInfo; |
59 | 58 | using v8::String; |
60 | 59 | using v8::Uint32; |
@@ -268,7 +267,7 @@ void Uptime(const FunctionCallbackInfo<Value>& args) { |
268 | 267 | uv_update_time(env->event_loop()); |
269 | 268 | uptime = uv_now(env->event_loop()) - prog_start_time; |
270 | 269 |
|
271 | | - args.GetReturnValue().Set(Number::New(env->isolate(), uptime / 1000)); |
| 270 | + args.GetReturnValue().Set(uptime / 1000); |
272 | 271 | } |
273 | 272 |
|
274 | 273 |
|
@@ -793,7 +792,7 @@ void EnvEnumerator(const PropertyCallbackInfo<Array>& info) { |
793 | 792 |
|
794 | 793 | void GetParentProcessId(Local<Name> property, |
795 | 794 | const PropertyCallbackInfo<Value>& info) { |
796 | | - info.GetReturnValue().Set(Integer::New(info.GetIsolate(), uv_os_getppid())); |
| 795 | + info.GetReturnValue().Set(uv_os_getppid()); |
797 | 796 | } |
798 | 797 |
|
799 | 798 | void GetActiveRequests(const FunctionCallbackInfo<Value>& args) { |
|