From 9dba96dc1a754616c81a550c057ce7cf9552e9cf Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 20 Mar 2019 09:02:57 +0800 Subject: process: patch more process properties during pre-execution Delay the creation of process properties that depend on runtime states and properties that should not be accessed during bootstrap and patch them during pre-execution: - process.argv - process.execPath - process.title - process.pid - process.ppid - process.REVERT_* - process.debugPort PR-URL: https://github.com/nodejs/node/pull/26945 Reviewed-By: Gus Caplan Reviewed-By: Benjamin Gruenbaum --- src/node_process_methods.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/node_process_methods.cc') diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index d2ba00b89b..dd27329ee2 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -426,6 +426,7 @@ static void InitializeProcessMethods(Local target, env->SetMethod(target, "dlopen", binding::DLOpen); env->SetMethod(target, "reallyExit", ReallyExit); env->SetMethodNoSideEffect(target, "uptime", Uptime); + env->SetMethod(target, "patchProcessObject", PatchProcessObject); } } // namespace node -- cgit v1.2.3