diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-05-20 13:06:55 +0200 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-06-03 17:27:48 +0200 |
commit | bda7da34c6f8edabf45623acb21a410c76a33bff (patch) | |
tree | b3d4c8e40d9c316f3e620bf6f6492302b936512a /src/node_worker.cc | |
parent | f0018a5152a9faaf2104d62f3152776a60f59390 (diff) | |
download | android-node-v8-bda7da34c6f8edabf45623acb21a410c76a33bff.tar.gz android-node-v8-bda7da34c6f8edabf45623acb21a410c76a33bff.tar.bz2 android-node-v8-bda7da34c6f8edabf45623acb21a410c76a33bff.zip |
src: inline ProcessCliArgs in the Environment constructor
Inline `ProcessCliArgs()` in the `Environment` constructor, and
emit the `Environment` creation trace events with the arguments
earlier. Remove the unused arguments passed to `CreateProcessObject()`
since these are now attached to process in `PatchProcessObject()`
during pre-execution instead.
PR-URL: https://github.com/nodejs/node/pull/27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_worker.cc')
-rw-r--r-- | src/node_worker.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_worker.cc b/src/node_worker.cc index e84b36f132..b4fd0028af 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc @@ -256,6 +256,8 @@ void Worker::Run() { // public API. env_.reset(new Environment(data.isolate_data_.get(), context, + std::move(argv_), + std::move(exec_argv_), Environment::kNoFlags, thread_id_)); CHECK_NOT_NULL(env_); @@ -264,7 +266,6 @@ void Worker::Run() { env_->set_worker_context(this); env_->InitializeLibuv(profiler_idle_notifier_started_); - env_->ProcessCliArgs(std::move(argv_), std::move(exec_argv_)); } { Mutex::ScopedLock lock(mutex_); |