Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-11-12 21:33:37 +0300
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-11-18 08:16:25 +0300
commit850f38125c17624c8950291c273d759e74d4b0ea (patch)
tree61980f704050c2cd3d689c815504287f914c9dbb /src/handle_wrap.cc
parent3e2b68aff3a4b8c065ddb561122b18817201f524 (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/handle_wrap.cc')
-rw-r--r--src/handle_wrap.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc
index 888640e9493..fc84ca19bb2 100644
--- a/src/handle_wrap.cc
+++ b/src/handle_wrap.cc
@@ -116,6 +116,7 @@ HandleWrap::HandleWrap(Environment* env,
handle_(handle) {
handle_->data = this;
HandleScope scope(env->isolate());
+ CHECK(env->has_run_bootstrapping_code());
env->handle_wrap_queue()->PushBack(this);
}