From 41553580318a0602f231ada8f1d3b37b392f3f40 Mon Sep 17 00:00:00 2001 From: Harshitha KP Date: Mon, 16 Mar 2020 06:22:27 -0400 Subject: [PATCH] src: replace handle dereference with ContainerOf this was influenced by https://github.com/nodejs/node/pull/32269 PR-URL: https://github.com/nodejs/node/pull/32298 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- src/process_wrap.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/process_wrap.cc b/src/process_wrap.cc index a75f271d1c77b8..e294c6464f2a11 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -291,8 +291,7 @@ class ProcessWrap : public HandleWrap { static void OnExit(uv_process_t* handle, int64_t exit_status, int term_signal) { - ProcessWrap* wrap = static_cast(handle->data); - CHECK_NOT_NULL(wrap); + ProcessWrap* wrap = ContainerOf(&ProcessWrap::process_, handle); CHECK_EQ(&wrap->process_, handle); Environment* env = wrap->env();