Skip to content

Commit 4155358

Browse files
HarshithaKPtargos
authored andcommittedApr 22, 2020
src: replace handle dereference with ContainerOf
this was influenced by #32269 PR-URL: #32298 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 8b355ea commit 4155358

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎src/process_wrap.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ class ProcessWrap : public HandleWrap {
291291
static void OnExit(uv_process_t* handle,
292292
int64_t exit_status,
293293
int term_signal) {
294-
ProcessWrap* wrap = static_cast<ProcessWrap*>(handle->data);
295-
CHECK_NOT_NULL(wrap);
294+
ProcessWrap* wrap = ContainerOf(&ProcessWrap::process_, handle);
296295
CHECK_EQ(&wrap->process_, handle);
297296

298297
Environment* env = wrap->env();

0 commit comments

Comments
 (0)
Please sign in to comment.