diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-11-12 21:33:37 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-11-19 16:46:00 +0300 |
commit | 592d51cb23ff9de1737a827bd023b8a08e2a49a6 (patch) | |
tree | 9be01fd6c9b870479f227e5f0cd9afce398249f1 /src/node.cc | |
parent | fba2f9a3d6ac7a2ce4fb44ac625482edc4da34b1 (diff) |
src: enhance feature access `CHECK`s during bootstrap
This adds `CHECK`s verifying that bootstrapping has finished
before environment variables are accessed or handles/requests
are created. The latter complements a pair of existent checks,
but fails earlier and thus gives information about the call
site, effectively addressing the TODO comment there.
PR-URL: https://github.com/nodejs/node/pull/30452
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node.cc')
-rw-r--r-- | src/node.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node.cc b/src/node.cc index 5a8e6ea8c07..5379b42b578 100644 --- a/src/node.cc +++ b/src/node.cc @@ -344,7 +344,8 @@ MaybeLocal<Value> Environment::RunBootstrapping() { // Make sure that no request or handle is created during bootstrap - // if necessary those should be done in pre-execution. - // TODO(joyeecheung): print handles/requests before aborting + // Usually, doing so would trigger the checks present in the ReqWrap and + // HandleWrap classes, so this is only a consistency check. CHECK(req_wrap_queue()->IsEmpty()); CHECK(handle_wrap_queue()->IsEmpty()); |