GeezerVison is showing github.com — src: simplify uptime and ppid return values · nodejs/node@9caad06
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; |
@@ -259,7 +258,7 @@ void Uptime(const FunctionCallbackInfo<Value>& args) { |
259 | 258 | uv_update_time(env->event_loop()); |
260 | 259 | uptime = uv_now(env->event_loop()) - prog_start_time; |
261 | 260 |
|
262 | | - args.GetReturnValue().Set(Number::New(env->isolate(), uptime / 1000)); |
| 261 | + args.GetReturnValue().Set(uptime / 1000); |
263 | 262 | } |
264 | 263 |
|
265 | 264 |
|
@@ -790,7 +789,7 @@ void EnvEnumerator(const PropertyCallbackInfo<Array>& info) { |
790 | 789 |
|
791 | 790 | void GetParentProcessId(Local<Name> property, |
792 | 791 | const PropertyCallbackInfo<Value>& info) { |
793 | | - info.GetReturnValue().Set(Integer::New(info.GetIsolate(), uv_os_getppid())); |
| 792 | + info.GetReturnValue().Set(uv_os_getppid()); |
794 | 793 | } |
795 | 794 |
|
796 | 795 | void GetActiveRequests(const FunctionCallbackInfo<Value>& args) { |
|