Commit f7b4a96b authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Fix spurious bugs in GrowAndShrinkNewSpace when the

min and max new space sizes are equal.
Review URL: https://chromiumcodereview.appspot.com/10241002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 292e007c
......@@ -1275,6 +1275,13 @@ TEST(GrowAndShrinkNewSpace) {
InitializeVM();
NewSpace* new_space = HEAP->new_space();
if (HEAP->ReservedSemiSpaceSize() == HEAP->InitialSemiSpaceSize()) {
// The max size cannot exceed the reserved size, since semispaces must be
// always within the reserved space. We can't test new space growing and
// shrinking if the reserved size is the same as the minimum (initial) size.
return;
}
// Explicitly growing should double the space capacity.
intptr_t old_capacity, new_capacity;
old_capacity = new_space->Capacity();
......@@ -1315,6 +1322,14 @@ TEST(GrowAndShrinkNewSpace) {
TEST(CollectingAllAvailableGarbageShrinksNewSpace) {
InitializeVM();
if (HEAP->ReservedSemiSpaceSize() == HEAP->InitialSemiSpaceSize()) {
// The max size cannot exceed the reserved size, since semispaces must be
// always within the reserved space. We can't test new space growing and
// shrinking if the reserved size is the same as the minimum (initial) size.
return;
}
v8::HandleScope scope;
NewSpace* new_space = HEAP->new_space();
intptr_t old_capacity, new_capacity;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment