summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/chrome_dll_main.cc9
-rw-r--r--chrome/common/main_function_params.h6
-rw-r--r--chrome/renderer/renderer_main.cc2
3 files changed, 12 insertions, 5 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index c22d05c..0703fc3 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -488,8 +488,15 @@ int ChromeMain(int argc, const char** argv) {
#endif
} else if (process_type == switches::kZygoteProcess) {
#if defined(OS_LINUX)
- if (ZygoteMain(main_params))
+ if (ZygoteMain(main_params)) {
+ // Zygote::HandleForkRequest may have reallocated the command
+ // line so update it here with the new version.
+ const CommandLine& parsed_command_line =
+ *CommandLine::ForCurrentProcess();
+ MainFunctionParams main_params(parsed_command_line, sandbox_wrapper,
+ &autorelease_pool);
RendererMain(main_params);
+ }
#else
NOTIMPLEMENTED();
#endif
diff --git a/chrome/common/main_function_params.h b/chrome/common/main_function_params.h
index 1a240c5..b224892 100644
--- a/chrome/common/main_function_params.h
+++ b/chrome/common/main_function_params.h
@@ -6,8 +6,8 @@
// plugin) to shield the call sites from the differences between platforms
// (e.g., POSIX doesn't need to pass any sandbox information).
-#ifndef CHROME_COMMON_MAIN_FUNCTINON_PARAMS_H_
-#define CHROME_COMMON_MAIN_FUNCTINON_PARAMS_H_
+#ifndef CHROME_COMMON_MAIN_FUNCTION_PARAMS_H_
+#define CHROME_COMMON_MAIN_FUNCTION_PARAMS_H_
#include "base/command_line.h"
#include "chrome/common/sandbox_init_wrapper.h"
@@ -30,4 +30,4 @@ struct MainFunctionParams {
Task* ui_task;
};
-#endif // CHROME_COMMON_MAIN_FUNCTINON_PARAMS_H_
+#endif // CHROME_COMMON_MAIN_FUNCTION_PARAMS_H_
diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc
index fc4d291..03e731f 100644
--- a/chrome/renderer/renderer_main.cc
+++ b/chrome/renderer/renderer_main.cc
@@ -59,7 +59,7 @@ static void HandleRendererErrorTestParameters(const CommandLine& command_line) {
}
}
-// mainline routine for running as the Rendererer process
+// mainline routine for running as the Renderer process
int RendererMain(const MainFunctionParams& parameters) {
const CommandLine& parsed_command_line = parameters.command_line_;
base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_;