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

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: build fix 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.cc » ('j') | no next file with comments »
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 355305e33c2434c4b0679e92a59859701a0d9143..04ad374eec78a81fc7de20365bc10aec281ec3aa 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -496,10 +496,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);
+#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.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698