diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-03-11 23:52:47 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-03-19 21:00:48 +0800 |
commit | 197dbf60f143ecb5dce1c2ac14f3eaa19f2227f9 (patch) | |
tree | a4c30dacafbf70ad3d4f779560dcbc5fb1ccbfcc /src | |
parent | 9868d544119409750231d4a5ff94a356385b126d (diff) | |
download | android-node-v8-197dbf60f143ecb5dce1c2ac14f3eaa19f2227f9.tar.gz android-node-v8-197dbf60f143ecb5dce1c2ac14f3eaa19f2227f9.tar.bz2 android-node-v8-197dbf60f143ecb5dce1c2ac14f3eaa19f2227f9.zip |
process: check no handle or request is active after bootstrap
PR-URL: https://github.com/nodejs/node/pull/26593
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/node.cc b/src/node.cc index ccff5b6aa4..b42f0169de 100644 --- a/src/node.cc +++ b/src/node.cc @@ -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); |