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 committed Mar 19, 2019
1 parent 9868d54 commit 197dbf6
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 @@ -358,6 +358,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 197dbf6

Please sign in to comment.