process: check no handle or request is active after bootstrap · nodejs/node@899de0a (original) (raw)

Original file line number Diff line number Diff line change
@@ -360,6 +360,12 @@ MaybeLocal RunBootstrapping(Environment* env) {
360 360 .IsNothing())
361 361 return MaybeLocal();
362 362
363 +// Make sure that no request or handle is created during bootstrap -
364 +// if necessary those should be done in pre-exeuction.
365 +// TODO(joyeecheung): print handles/requests before aborting
366 +CHECK(env->req_wrap_queue()->IsEmpty());
367 +CHECK(env->handle_wrap_queue()->IsEmpty());
368 +
363 369 env->set_has_run_bootstrapping_code(true);
364 370
365 371 return scope.EscapeMaybe(result);