Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1997)

Unified Diff: base/test/launcher/test_launcher.cc

Issue 467673002: Disallow breakaway from job on Windows 8, which supports nested jobs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_launcher.cc
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index e6c1507250d14eb90ac80b770e75e0060f8f269e..cff80263260aad33f0e941f7d3df9f2be57311e5 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -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.";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698