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

Unified Diff: content/common/sandbox_win.cc

Issue 319573006: Add sandbox support for process memory limits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready for review Created 6 years, 6 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 | sandbox/win/src/broker_services.h » ('j') | sandbox/win/src/broker_services.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 91fac7dbd4e81944d5f2cc1787de3870712e5c56..eabeef9f7d14657c01f69b543da2bd0fa9f074f1 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -494,10 +494,14 @@ void SetJobLevel(const CommandLine& cmd_line,
sandbox::JobLevel job_level,
uint32 ui_exceptions,
sandbox::TargetPolicy* policy) {
- if (ShouldSetJobLevel(cmd_line))
+ if (ShouldSetJobLevel(cmd_line)) {
+#ifdef _WIN64
+ policy->SetJobMemoryLimit(4ULL * 1024 * 1024 * 1024, true);
+#endif
policy->SetJobLevel(job_level, ui_exceptions);
- else
+ } else {
policy->SetJobLevel(sandbox::JOB_NONE, 0);
+ }
}
// TODO(jschuh): Need get these restrictions applied to NaCl and Pepper.
« no previous file with comments | « no previous file | sandbox/win/src/broker_services.h » ('j') | sandbox/win/src/broker_services.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698