Skip to content

Commit

Permalink
process: check no handle or request is active after bootstrap
Browse files Browse the repository at this point in the history
PR-URL: #26593
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
joyeecheung authored and targos committed Mar 27, 2019
1 parent 4314dbf commit 899de0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ MaybeLocal<Value> RunBootstrapping(Environment* env) {
.IsNothing())
return MaybeLocal<Value>();

// 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);
Expand Down

0 comments on commit 899de0a

Please sign in to comment.