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

Unified Diff: src/api.cc

Issue 242074: Fix the stack limits setting API so it is usable. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' 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
===================================================================
--- src/api.cc (revision 2982)
+++ src/api.cc (working copy)
@@ -341,9 +341,12 @@
bool SetResourceConstraints(ResourceConstraints* constraints) {
- bool result = i::Heap::ConfigureHeap(constraints->max_young_space_size(),
- constraints->max_old_space_size());
- if (!result) return false;
+ int semispace_size = constraints->max_young_space_size();
+ int old_gen_size = constraints->max_old_space_size();
+ if (semispace_size != 0 || old_gen_size != 0) {
+ bool result = i::Heap::ConfigureHeap(semispace_size, old_gen_size);
+ if (!result) return false;
+ }
if (constraints->stack_limit() != NULL) {
uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit());
i::StackGuard::SetStackLimit(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