summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_dll_main.cc
diff options
context:
space:
mode:
authorcraig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 10:49:32 +0000
committercraig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 10:49:32 +0000
commitccaddf9653bd5ddb1ae1426cfa61572385ed717d (patch)
tree85aee90c851c260305a09c48ea5d16da59b64fa6 /chrome/app/chrome_dll_main.cc
parenta45ca532576fa7241db6c83c018f4ef6378633b1 (diff)
downloadchromium_src-ccaddf9653bd5ddb1ae1426cfa61572385ed717d.zip
chromium_src-ccaddf9653bd5ddb1ae1426cfa61572385ed717d.tar.gz
chromium_src-ccaddf9653bd5ddb1ae1426cfa61572385ed717d.tar.bz2
Fix a valgrind error related to Zygote's CommandLine usage.
Also touch up some include guards and a comment. Review URL: http://codereview.chromium.org/131054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_dll_main.cc')
-rw-r--r--chrome/app/chrome_dll_main.cc9
1 files changed, 8 insertions, 1 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