diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-04-06 00:13:31 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-04-08 01:04:55 +0300 |
commit | 8aa7ef7840ef5f7161f3195e51a3fa6783290160 (patch) | |
tree | 5c1f78c86aff43e0b46c1789f05074a6dbfdd587 /src/node_worker.cc | |
parent | 6faa162f5561a005c2ea45f594bf7cfcbe10e1b6 (diff) |
src: initialize inspector before RunBootstrapping()
This is necessary for `--inspect-brk-node` to work, and for the
inspector to be aware of scripts created before bootstrapping.
Fixes: https://github.com/nodejs/node/issues/32648
Refs: https://github.com/nodejs/node/pull/30467#discussion_r396879908
PR-URL: https://github.com/nodejs/node/pull/32672
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_worker.cc')
-rw-r--r-- | src/node_worker.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/node_worker.cc b/src/node_worker.cc index 611d50220ad..8c4ea611672 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc @@ -310,7 +310,8 @@ void Worker::Run() { std::move(argv_), std::move(exec_argv_), EnvironmentFlags::kNoFlags, - thread_id_)); + thread_id_, + std::move(inspector_parent_handle_))); if (is_stopped()) return; CHECK_NOT_NULL(env_); env_->set_env_vars(std::move(env_vars_)); @@ -328,12 +329,8 @@ void Worker::Run() { { CreateEnvMessagePort(env_.get()); Debug(this, "Created message port for worker %llu", thread_id_.id); - if (LoadEnvironment(env_.get(), - StartExecutionCallback{}, - std::move(inspector_parent_handle_)) - .IsEmpty()) { + if (LoadEnvironment(env_.get(), StartExecutionCallback{}).IsEmpty()) return; - } Debug(this, "Loaded environment for worker %llu", thread_id_.id); } |