| Index: headless/lib/headless_content_main_delegate.cc
|
| diff --git a/headless/lib/headless_content_main_delegate.cc b/headless/lib/headless_content_main_delegate.cc
|
| index fc8f645164aacac9e20166366681351c0b52b680..1aa61b45fe926021101df0b3654daaf921c7237c 100644
|
| --- a/headless/lib/headless_content_main_delegate.cc
|
| +++ b/headless/lib/headless_content_main_delegate.cc
|
| @@ -160,9 +160,14 @@ void HeadlessContentMainDelegate::InitCrashReporter(
|
| void HeadlessContentMainDelegate::PreSandboxStartup() {
|
| const base::CommandLine& command_line(
|
| *base::CommandLine::ForCurrentProcess());
|
| - const std::string process_type =
|
| - command_line.GetSwitchValueASCII(switches::kProcessType);
|
| +#if defined(OS_WIN)
|
| + // Windows always needs to initialize logging, otherwise you get a renderer
|
| + // crash.
|
| InitLogging(command_line);
|
| +#else
|
| + if (command_line.HasSwitch(switches::kEnableLogging))
|
| + InitLogging(command_line);
|
| +#endif
|
| InitCrashReporter(command_line);
|
| InitializeResourceBundle();
|
| }
|
|
|