]> khamidou — GitHub mirrors - electron.git/commitdiff
Don't append duplicate arguments to renderer process.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 30 Jan 2014 13:06:56 +0000 (21:06 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 30 Jan 2014 13:06:56 +0000 (21:06 +0800)
app/atom_main_delegate.cc

index 40a42d721741f327bb9d63e70e26835d236fdc2e..1f304926db99f48e3fb36383e595cb852c8777aa 100644 (file)
@@ -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);