diff options
author | Harshitha KP <harshi46@in.ibm.com> | 2020-03-16 13:22:27 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-03-30 01:42:44 +0300 |
commit | 768b0f54eb143329743d2696bd36327f1bad7744 (patch) | |
tree | 8ddb221b24ec734d357a19536a5942e67ee01bce /src/process_wrap.cc | |
parent | effebf87ab01b420d1b6cbace6d64b649f2264e8 (diff) |
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>
Diffstat (limited to 'src/process_wrap.cc')
-rw-r--r-- | src/process_wrap.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/process_wrap.cc b/src/process_wrap.cc index 1e7de56c6d1..3d1065c9922 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<ProcessWrap*>(handle->data); - CHECK_NOT_NULL(wrap); + ProcessWrap* wrap = ContainerOf(&ProcessWrap::process_, handle); CHECK_EQ(&wrap->process_, handle); Environment* env = wrap->env(); |