diff --git a/src/node_file-inl.h b/src/node_file-inl.h index 28d4d9ab8c8903..351f3df809d94a 100644 --- a/src/node_file-inl.h +++ b/src/node_file-inl.h @@ -159,7 +159,7 @@ FSReqPromise::~FSReqPromise() { // Validate that the promise was explicitly resolved or rejected but only if // the Isolate is not terminating because in this case the promise might have // not finished. - if (!env()->is_stopping()) CHECK(finished_); + CHECK_IMPLIES(!finished_, !env()->can_call_into_js()); } template