From 6f545d19024773d165552d7751f11c901a4bfbb4 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 11 Nov 2017 21:10:13 -0500 Subject: [PATCH] src: fix compiler warning in process.ppid This commit fixes a compiler warning with SetAccessor() by passing in the context. Backport-PR-URL: https://github.com/nodejs/node/pull/21760 PR-URL: https://github.com/nodejs/node/pull/16958 Reviewed-By: Anna Henningsen Reviewed-By: Gireesh Punathil Reviewed-By: Timothy Gu Reviewed-By: James M Snell Reviewed-By: Daniel Bevenius Reviewed-By: Franziska Hinkelmann --- src/node.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/node.cc b/src/node.cc index 621e59fcb64570..b8a1f59707d847 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3514,8 +3514,9 @@ void SetupProcessObject(Environment* env, Integer::New(env->isolate(), uv_os_getpid())); READONLY_PROPERTY(process, "features", GetFeatures(env)); - process->SetAccessor(FIXED_ONE_BYTE_STRING(env->isolate(), "ppid"), - GetParentProcessId); + CHECK(process->SetAccessor(env->context(), + FIXED_ONE_BYTE_STRING(env->isolate(), "ppid"), + GetParentProcessId).FromJust()); auto scheduled_immediate_count = FIXED_ONE_BYTE_STRING(env->isolate(), "_scheduledImmediateCount");