Skip to content

Commit 197dbf6

Browse files
committed
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 9868d54 commit 197dbf6

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
@@ -358,6 +358,12 @@ MaybeLocal<Value> RunBootstrapping(Environment* env) {
358358
.IsNothing())
359359
return MaybeLocal<Value>();
360360

361+
// Make sure that no request or handle is created during bootstrap -
362+
// if necessary those should be done in pre-exeuction.
363+
// TODO(joyeecheung): print handles/requests before aborting
364+
CHECK(env->req_wrap_queue()->IsEmpty());
365+
CHECK(env->handle_wrap_queue()->IsEmpty());
366+
361367
env->set_has_run_bootstrapping_code(true);
362368

363369
return scope.EscapeMaybe(result);

0 commit comments

Comments
 (0)