Disallow breakaway from job on Windows 8, which supports nested jobs

BUG=371406, 392108
R=sky@chromium.org

Review URL: https://codereview.chromium.org/467673002

Cr-Commit-Position: refs/heads/master@{#289523}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289523 0039d316-1c4b-4281-b951-d872f2087c98
parent fcd8e584
......@@ -41,6 +41,10 @@
#include "base/mac/scoped_nsautorelease_pool.h"
#endif
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#endif
namespace base {
// Launches a child process using |command_line|. If the child process is still
......@@ -1034,9 +1038,10 @@ int LaunchChildTestProcessWithOptions(const CommandLine& command_line,
// Allow break-away from job since sandbox and few other places rely on it
// on Windows versions prior to Windows 8 (which supports nested jobs).
// TODO(phajdan.jr): Do not allow break-away on Windows 8.
if (flags & TestLauncher::ALLOW_BREAKAWAY_FROM_JOB)
if (win::GetVersion() < win::VERSION_WIN8 &&
flags & TestLauncher::ALLOW_BREAKAWAY_FROM_JOB) {
job_flags |= JOB_OBJECT_LIMIT_BREAKAWAY_OK;
}
if (!SetJobObjectLimitFlags(job_handle.Get(), job_flags)) {
LOG(ERROR) << "Could not SetJobObjectLimitFlags.";
......
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