Skip to content

Commit 6f545d1

Browse files
cjihrigrvagg
authored andcommitted
src: fix compiler warning in process.ppid
This commit fixes a compiler warning with SetAccessor() by passing in the context. Backport-PR-URL: #21760 PR-URL: #16958 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
1 parent abcc911 commit 6f545d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/node.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3514,8 +3514,9 @@ void SetupProcessObject(Environment* env,
35143514
Integer::New(env->isolate(), uv_os_getpid()));
35153515
READONLY_PROPERTY(process, "features", GetFeatures(env));
35163516

3517-
process->SetAccessor(FIXED_ONE_BYTE_STRING(env->isolate(), "ppid"),
3518-
GetParentProcessId);
3517+
CHECK(process->SetAccessor(env->context(),
3518+
FIXED_ONE_BYTE_STRING(env->isolate(), "ppid"),
3519+
GetParentProcessId).FromJust());
35193520

35203521
auto scheduled_immediate_count =
35213522
FIXED_ONE_BYTE_STRING(env->isolate(), "_scheduledImmediateCount");

0 commit comments

Comments
 (0)