summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-11-22 00:13:57 -0500
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-11-27 06:20:22 +0100
commit11c17e4bc912af7dd5b6ef47176fcccee9064b50 (patch)
treecd03565903c0e84f1ae6654db8dc362591b1f914 /src
parent567b9f86cc2fa94ea6cd8cf53b5c832081a908d6 (diff)
downloadandroid-node-v8-11c17e4bc912af7dd5b6ef47176fcccee9064b50.tar.gz
android-node-v8-11c17e4bc912af7dd5b6ef47176fcccee9064b50.tar.bz2
android-node-v8-11c17e4bc912af7dd5b6ef47176fcccee9064b50.zip
src: simplify uptime and ppid return values
This commit removes extraneous wrapping of return values in Uptime() and GetParentProcessId(). PR-URL: https://github.com/nodejs/node/pull/24562 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jon Moss <me@jonathanmoss.me>
Diffstat (limited to 'src')
-rw-r--r--src/node_process.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/node_process.cc b/src/node_process.cc
index 017d8d0073..f52e985687 100644
--- a/src/node_process.cc
+++ b/src/node_process.cc
@@ -54,7 +54,6 @@ using v8::Integer;
using v8::Isolate;
using v8::Local;
using v8::Name;
-using v8::Number;
using v8::PropertyCallbackInfo;
using v8::String;
using v8::Uint32;
@@ -259,7 +258,7 @@ void Uptime(const FunctionCallbackInfo<Value>& args) {
uv_update_time(env->event_loop());
uptime = uv_now(env->event_loop()) - prog_start_time;
- args.GetReturnValue().Set(Number::New(env->isolate(), uptime / 1000));
+ args.GetReturnValue().Set(uptime / 1000);
}
@@ -790,7 +789,7 @@ void EnvEnumerator(const PropertyCallbackInfo<Array>& info) {
void GetParentProcessId(Local<Name> property,
const PropertyCallbackInfo<Value>& info) {
- info.GetReturnValue().Set(Integer::New(info.GetIsolate(), uv_os_getppid()));
+ info.GetReturnValue().Set(uv_os_getppid());
}
void GetActiveRequests(const FunctionCallbackInfo<Value>& args) {