Skip to content

Commit

Permalink
src: replace handle dereference with ContainerOf
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
HarshithaKP authored and addaleax committed Mar 29, 2020
1 parent effebf8 commit 768b0f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/process_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 768b0f5

Please sign in to comment.