Only append command line params for renderer process
authorCheng Zhao <zcbenz@gmail.com>
Sun, 26 Apr 2015 09:26:25 +0000 (17:26 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 27 Apr 2015 07:11:59 +0000 (15:11 +0800)
atom/browser/atom_browser_client.cc

index 0ee2c7f..c897d5d 100644 (file)
@@ -138,6 +138,10 @@ void AtomBrowserClient::OverrideSiteInstanceForNavigation(
 void AtomBrowserClient::AppendExtraCommandLineSwitches(
     base::CommandLine* command_line,
     int child_process_id) {
+  std::string process_type = command_line->GetSwitchValueASCII("type");
+  if (process_type != "renderer")
+    return;
+
   WindowList* list = WindowList::GetInstance();
   NativeWindow* window = nullptr;