X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Fbrowser%2Fchild_process_launcher.cc;h=3869c6841bb060c0ff330d4704e186f71738120a;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=5d7b612bf8a555f8dfeabf521db2c488cf1e4a46;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/browser/child_process_launcher.cc b/src/content/browser/child_process_launcher.cc index 5d7b612..3869c68 100644 --- a/src/content/browser/child_process_launcher.cc +++ b/src/content/browser/child_process_launcher.cc @@ -58,17 +58,18 @@ class ChildProcessLauncher::Context 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( @@ -221,7 +222,7 @@ class ChildProcessLauncher::Context 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)); @@ -365,6 +366,9 @@ class ChildProcessLauncher::Context bool background) { base::Process process(handle); process.SetProcessBackgrounded(background); +#if defined(OS_ANDROID) + SetChildProcessInForeground(handle, !background); +#endif } static void TerminateInternal( @@ -499,7 +503,7 @@ void ChildProcessLauncher::SetProcessBackgrounded(bool background) { } void ChildProcessLauncher::SetTerminateChildOnShutdown( - bool terminate_on_shutdown) { + bool terminate_on_shutdown) { if (context_.get()) context_->set_terminate_child_on_shutdown(terminate_on_shutdown); }