From: Cheng Zhao Date: Thu, 30 Jan 2014 13:06:56 +0000 (+0800) Subject: Don't append duplicate arguments to renderer process. X-Git-Tag: v0.9.5~4^2~10 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=ce586e08358ece4141c66865a6b52bccea796d08;p=electron.git Don't append duplicate arguments to renderer process. --- diff --git a/app/atom_main_delegate.cc b/app/atom_main_delegate.cc index 40a42d72..1f304926 100644 --- a/app/atom_main_delegate.cc +++ b/app/atom_main_delegate.cc @@ -51,6 +51,12 @@ void AtomMainDelegate::PreSandboxStartup() { InitializeResourceBundle(); CommandLine* command_line = CommandLine::ForCurrentProcess(); + std::string process_type = command_line->GetSwitchValueASCII( + switches::kProcessType); + + // Don't append arguments for renderer process. + if (process_type == switches::kRendererProcess) + return; // Disable renderer sandbox for most of node's functions. command_line->AppendSwitch(switches::kNoSandbox);