From 768b0f54eb143329743d2696bd36327f1bad7744 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 1e7de56c6d1581..3d1065c9922183 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -292,8 +292,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();