mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
process: store argv in Environment
This gets rid of Environment::ExecutionMode as well now that we use the original arguments to determine execution mode. PR-URL: https://github.com/nodejs/node/pull/26945 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
6 files changed
+19
-41
No files matched your search
+2
-2
@@ -96,6 +96,7 @@ Worker::Worker(Environment* env,
|
||||
env->inspector_agent()->GetParentHandle(thread_id_, url);
|
||||
#endif
|
||||
|
||||
argv_ = std::vector<std::string>{env->argv()[0]};
|
||||
// Mark this Worker object as weak until we actually start the thread.
|
||||
MakeWeak();
|
||||
|
||||
@@ -260,8 +261,7 @@ void Worker::Run() {
|
||||
env_->set_worker_context(this);
|
||||
|
||||
env_->InitializeLibuv(profiler_idle_notifier_started_);
|
||||
env_->ProcessCliArgs(std::vector<std::string>{},
|
||||
std::move(exec_argv_));
|
||||
env_->ProcessCliArgs(std::move(argv_), std::move(exec_argv_));
|
||||
}
|
||||
{
|
||||
Mutex::ScopedLock lock(mutex_);
|
||||
|
||||
Reference in new issue
Block a user