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();