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

Unified Diff: src/api.cc

Issue 242014: Adds an API for setting the stack limit per-thread. (Closed)
Patch Set: Leaves the limits of pending interrupts alone instead of reestablishing them." Created 11 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/arm/simulator-arm.h » ('j') | no next file with comments »
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 5b473c9ad9c0016514045202224b5d07463cf9f1..12d50f2bd7126f35d8a4d10180a363382fac4b8c 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -334,21 +334,19 @@ v8::Handle<Boolean> False() {
}
-ResourceConstraints::ResourceConstraints()
+HeapResourceConstraints::HeapResourceConstraints()
: max_young_space_size_(0),
- max_old_space_size_(0),
- stack_limit_(NULL) { }
+ max_old_space_size_(0) { }
-bool SetResourceConstraints(ResourceConstraints* constraints) {
- bool result = i::Heap::ConfigureHeap(constraints->max_young_space_size(),
- constraints->max_old_space_size());
- if (!result) return false;
- if (constraints->stack_limit() != NULL) {
- uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit());
- i::StackGuard::SetStackLimit(limit);
- }
- return true;
+bool SetHeapResourceConstraints(HeapResourceConstraints* constraints) {
+ return i::Heap::ConfigureHeap(constraints->max_young_space_size(),
+ constraints->max_old_space_size());
+}
+
+
+void SetStackLimit(uint32_t* limit) {
+ i::StackGuard::SetStackLimit(reinterpret_cast<uintptr_t>(limit));
}
« no previous file with comments | « include/v8.h ('k') | src/arm/simulator-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698