Skip to content

Commit 899de0a

Browse files
joyeecheungtargos
authored andcommitted
process: check no handle or request is active after bootstrap
PR-URL: #26593 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 4314dbf commit 899de0a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/node.cc

+6
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,12 @@ MaybeLocal<Value> RunBootstrapping(Environment* env) {
360360
.IsNothing())
361361
return MaybeLocal<Value>();
362362

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+
363369
env->set_has_run_bootstrapping_code(true);
364370

365371
return scope.EscapeMaybe(result);

0 commit comments

Comments
 (0)