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 <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Harshitha KP authored and Anna Henningsen committed 2020-03-30 19:18:21 +02:00
1 parent 7d4ec42b3a
commit 06bff18fa8
1 file changed
+1 -2
+1 -2
View File
@@ -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<ProcessWrap*>(handle->data);
CHECK_NOT_NULL(wrap);
ProcessWrap* wrap = ContainerOf(&ProcessWrap::process_, handle);
CHECK_EQ(&wrap->process_, handle);
Environment* env = wrap->env();