Skip to content

Commit 06bff18

Browse files
HarshithaKPaddaleax
authored andcommitted
src: replace handle dereference with ContainerOf
this was influenced by #32269 PR-URL: #32298 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 7d4ec42 commit 06bff18

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
@@ -292,8 +292,7 @@ class ProcessWrap : public HandleWrap {
292292
static void OnExit(uv_process_t* handle,
293293
int64_t exit_status,
294294
int term_signal) {
295-
ProcessWrap* wrap = static_cast<ProcessWrap*>(handle->data);
296-
CHECK_NOT_NULL(wrap);
295+
ProcessWrap* wrap = ContainerOf(&ProcessWrap::process_, handle);
297296
CHECK_EQ(&wrap->process_, handle);
298297

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

0 commit comments

Comments
 (0)