Commit 8109367a authored by inglorion's avatar inglorion Committed by Commit Bot

Revert crrev.com/c/1548839 and crrev.com/c/1549478

This reverts commits 63d7033a
("Do not block shutdown for process launch") and
6dc816e5 ("Launch child unsandboxed
processes in "Kill on Job Close" job.").

Reason for revert: Causes browser_tests time-outs on Windows.

Bug: 952529, 830954
Change-Id: I01ec7c713e0d406e3049d4e1d2e508204afd0aa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1570193Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Commit-Queue: Bob Haarman <inglorion@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652342}
parent 9d068806
...@@ -227,22 +227,13 @@ base::SingleThreadTaskRunner* GetProcessLauncherTaskRunner() { ...@@ -227,22 +227,13 @@ base::SingleThreadTaskRunner* GetProcessLauncherTaskRunner() {
launcher_task_runner( launcher_task_runner(
android::LauncherThread::GetMessageLoop()->task_runner()); android::LauncherThread::GetMessageLoop()->task_runner());
return (*launcher_task_runner).get(); return (*launcher_task_runner).get();
#else // defined(OS_ANDROID) #else // defined(OS_ANDROID)
constexpr base::TaskShutdownBehavior shutdown_behavior =
#if defined(OS_WIN)
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN;
#else
// Linux could use CONTINUE_ON_SHUTDOWN if ZygoteHostImpl was leaked on
// shutdown. Mac could use CONTINUE_ON_SHUTDOWN if PluginServiceImpl was
// leaked on shutdown.
base::TaskShutdownBehavior::BLOCK_SHUTDOWN;
#endif // defined(OS_WIN)
// TODO(http://crbug.com/820200): Investigate whether we could use // TODO(http://crbug.com/820200): Investigate whether we could use
// SequencedTaskRunner on platforms other than Windows. // SequencedTaskRunner on platforms other than Windows.
static base::LazySingleThreadTaskRunner launcher_task_runner = static base::LazySingleThreadTaskRunner launcher_task_runner =
LAZY_SINGLE_THREAD_TASK_RUNNER_INITIALIZER( LAZY_SINGLE_THREAD_TASK_RUNNER_INITIALIZER(
base::TaskTraits({base::MayBlock(), base::TaskPriority::USER_BLOCKING, base::TaskTraits({base::MayBlock(), base::TaskPriority::USER_BLOCKING,
shutdown_behavior}), base::TaskShutdownBehavior::BLOCK_SHUTDOWN}),
base::SingleThreadTaskRunnerThreadMode::DEDICATED); base::SingleThreadTaskRunnerThreadMode::DEDICATED);
return launcher_task_runner.Get().get(); return launcher_task_runner.Get().get();
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
......
...@@ -862,12 +862,13 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( ...@@ -862,12 +862,13 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess(
options.handles_to_inherit = handles_to_inherit; options.handles_to_inherit = handles_to_inherit;
BOOL in_job = true; BOOL in_job = true;
// Prior to Windows 8 nested jobs aren't possible. // Prior to Windows 8 nested jobs aren't possible.
if (base::win::GetVersion() >= base::win::VERSION_WIN8 || if (sandbox_type == SANDBOX_TYPE_NETWORK &&
(::IsProcessInJob(::GetCurrentProcess(), nullptr, &in_job) && (base::win::GetVersion() >= base::win::VERSION_WIN8 ||
!in_job)) { (::IsProcessInJob(::GetCurrentProcess(), nullptr, &in_job) &&
// Launch the process in a job to ensure that it doesn't outlive the !in_job))) {
// browser. This could happen if there is a lot of I/O on process // Launch the process in a job to ensure that the network process doesn't
// shutdown, in which case TerminateProcess would fail. // outlive the browser. This could happen if there is a lot of I/O on
// process shutdown, in which case TerminateProcess would fail.
// https://crbug.com/820996 // https://crbug.com/820996
if (!g_job_object_handle) { if (!g_job_object_handle) {
sandbox::Job job_obj; sandbox::Job job_obj;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment