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

Unified Diff: src/api.cc

Issue 23464022: Add a ResourceConstraint for the embedder to specify that V8 is running on a memory constrained dev… (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | « include/v8.h ('k') | src/isolate.h » ('j') | src/isolate.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index d587b81fd3461202a807bcdd0b68ab7f25f6d5a4..6cfea2a3484157384ad71a7d20f746407b0347d5 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -620,7 +620,8 @@ ResourceConstraints::ResourceConstraints()
: max_young_space_size_(0),
max_old_space_size_(0),
max_executable_size_(0),
- stack_limit_(NULL) { }
+ stack_limit_(NULL),
+ is_memory_constrained_(false) { }
bool SetResourceConstraints(ResourceConstraints* constraints) {
@@ -641,6 +642,7 @@ bool SetResourceConstraints(ResourceConstraints* constraints) {
uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit());
isolate->stack_guard()->SetStackLimit(limit);
}
+ isolate->setIsMemoryConstrained(constraints->is_memory_constrained());
return true;
}
« no previous file with comments | « include/v8.h ('k') | src/isolate.h » ('j') | src/isolate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698