client_thread_id_(BrowserThread::UI),
termination_status_(base::TERMINATION_STATUS_NORMAL_TERMINATION),
exit_code_(RESULT_CODE_NORMAL_EXIT),
- starting_(true)
+ starting_(true),
+ // TODO(earthdok): Re-enable on CrOS http://crbug.com/360622
+#if (defined(ADDRESS_SANITIZER) || defined(LEAK_SANITIZER) || \
+ defined(THREAD_SANITIZER)) && !defined(OS_CHROMEOS)
+ terminate_child_on_shutdown_(false)
+#else
+ terminate_child_on_shutdown_(true)
+#endif
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
, zygote_(false)
#endif
{
-#if defined(OS_POSIX)
- terminate_child_on_shutdown_ = !CommandLine::ForCurrentProcess()->
- HasSwitch(switches::kChildCleanExit);
-#else
- terminate_child_on_shutdown_ = true;
-#endif
}
void Launch(
GetAdditionalMappedFilesForChildProcess(*cmd_line, child_process_id,
&files_to_register);
- StartChildProcess(cmd_line->argv(), files_to_register,
+ StartChildProcess(cmd_line->argv(), child_process_id, files_to_register,
base::Bind(&ChildProcessLauncher::Context::OnChildProcessStarted,
this_object, client_thread_id, begin_launch_time));
bool background) {
base::Process process(handle);
process.SetProcessBackgrounded(background);
+#if defined(OS_ANDROID)
+ SetChildProcessInForeground(handle, !background);
+#endif
}
static void TerminateInternal(
}
void ChildProcessLauncher::SetTerminateChildOnShutdown(
- bool terminate_on_shutdown) {
+ bool terminate_on_shutdown) {
if (context_.get())
context_->set_terminate_child_on_shutdown(terminate_on_shutdown);
}