diff --git a/src/node.cc b/src/node.cc index fe28a8a2004761..9494cc11078a31 100644 --- a/src/node.cc +++ b/src/node.cc @@ -360,6 +360,12 @@ MaybeLocal RunBootstrapping(Environment* env) { .IsNothing()) return MaybeLocal(); + // Make sure that no request or handle is created during bootstrap - + // if necessary those should be done in pre-exeuction. + // TODO(joyeecheung): print handles/requests before aborting + CHECK(env->req_wrap_queue()->IsEmpty()); + CHECK(env->handle_wrap_queue()->IsEmpty()); + env->set_has_run_bootstrapping_code(true); return scope.EscapeMaybe(result);