Skip to content

Commit b6cb5ba

Browse files
committed
src: fix Worker execArgv empty vs non-empty permission inheritance
When options object is present, empty execArgv ([]) was incorrectly taking the fresh-options path instead of inheriting from parent. Refs: #65359
1 parent 514608a commit b6cb5ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/node_worker.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
806806
const bool empty_exec_argv =
807807
explicit_exec_argv && args[2].As<Array>()->Length() == 0;
808808

809-
if (args[1]->IsObject() || (explicit_exec_argv && !empty_exec_argv)) {
809+
if (explicit_exec_argv && !empty_exec_argv) {
810810
per_isolate_opts.reset(new PerIsolateOptions());
811811

812812
HandleEnvOptions(per_isolate_opts->per_env, [&env_vars](const char* name) {

0 commit comments

Comments
 (0)