Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index eec024f3fd1acc1b735913ec87073f0396cab109..80254b07b80ee981c5d82b496bde85a0b4268fe2 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -177,13 +177,11 @@ TEST(Tagging) { |
int request = 24; |
CHECK_EQ(request, static_cast<int>(OBJECT_POINTER_ALIGN(request))); |
CHECK(Smi::FromInt(42)->IsSmi()); |
- CHECK(Failure::RetryAfterGC(request, NEW_SPACE)->IsFailure()); |
- CHECK_EQ(request, Failure::RetryAfterGC(request, NEW_SPACE)->requested()); |
+ CHECK(Failure::RetryAfterGC(NEW_SPACE)->IsFailure()); |
CHECK_EQ(NEW_SPACE, |
- Failure::RetryAfterGC(request, NEW_SPACE)->allocation_space()); |
+ Failure::RetryAfterGC(NEW_SPACE)->allocation_space()); |
CHECK_EQ(OLD_POINTER_SPACE, |
- Failure::RetryAfterGC(request, |
- OLD_POINTER_SPACE)->allocation_space()); |
+ Failure::RetryAfterGC(OLD_POINTER_SPACE)->allocation_space()); |
CHECK(Failure::Exception()->IsFailure()); |
CHECK(Smi::FromInt(Smi::kMinValue)->IsSmi()); |
CHECK(Smi::FromInt(Smi::kMaxValue)->IsSmi()); |
@@ -195,8 +193,7 @@ TEST(GarbageCollection) { |
v8::HandleScope sc; |
// Check GC. |
- int free_bytes = Heap::MaxObjectSizeInPagedSpace(); |
- CHECK(Heap::CollectGarbage(free_bytes, NEW_SPACE)); |
+ Heap::CollectGarbage(NEW_SPACE); |
Handle<String> name = Factory::LookupAsciiSymbol("theFunction"); |
Handle<String> prop_name = Factory::LookupAsciiSymbol("theSlot"); |
@@ -221,7 +218,7 @@ TEST(GarbageCollection) { |
CHECK_EQ(Smi::FromInt(24), obj->GetProperty(*prop_namex)); |
} |
- CHECK(Heap::CollectGarbage(free_bytes, NEW_SPACE)); |
+ Heap::CollectGarbage(NEW_SPACE); |
// Function should be alive. |
CHECK(Top::context()->global()->HasLocalProperty(*name)); |
@@ -239,7 +236,7 @@ TEST(GarbageCollection) { |
} |
// After gc, it should survive. |
- CHECK(Heap::CollectGarbage(free_bytes, NEW_SPACE)); |
+ Heap::CollectGarbage(NEW_SPACE); |
CHECK(Top::context()->global()->HasLocalProperty(*obj_name)); |
CHECK(Top::context()->global()->GetProperty(*obj_name)->IsJSObject()); |
@@ -301,7 +298,7 @@ TEST(GlobalHandles) { |
} |
// after gc, it should survive |
- CHECK(Heap::CollectGarbage(0, NEW_SPACE)); |
+ Heap::CollectGarbage(NEW_SPACE); |
CHECK((*h1)->IsString()); |
CHECK((*h2)->IsHeapNumber()); |
@@ -382,8 +379,8 @@ TEST(WeakGlobalHandlesMark) { |
h2 = GlobalHandles::Create(*u); |
} |
- CHECK(Heap::CollectGarbage(0, OLD_POINTER_SPACE)); |
- CHECK(Heap::CollectGarbage(0, NEW_SPACE)); |
+ Heap::CollectGarbage(OLD_POINTER_SPACE); |
+ Heap::CollectGarbage(NEW_SPACE); |
// Make sure the object is promoted. |
GlobalHandles::MakeWeak(h2.location(), |
@@ -392,7 +389,7 @@ TEST(WeakGlobalHandlesMark) { |
CHECK(!GlobalHandles::IsNearDeath(h1.location())); |
CHECK(!GlobalHandles::IsNearDeath(h2.location())); |
- CHECK(Heap::CollectGarbage(0, OLD_POINTER_SPACE)); |
+ Heap::CollectGarbage(OLD_POINTER_SPACE); |
CHECK((*h1)->IsString()); |
@@ -426,7 +423,7 @@ TEST(DeleteWeakGlobalHandle) { |
CHECK(!WeakPointerCleared); |
// Mark-compact treats weak reference properly. |
- CHECK(Heap::CollectGarbage(0, OLD_POINTER_SPACE)); |
+ Heap::CollectGarbage(OLD_POINTER_SPACE); |
CHECK(WeakPointerCleared); |
} |
@@ -814,8 +811,7 @@ TEST(Iteration) { |
TEST(LargeObjectSpaceContains) { |
InitializeVM(); |
- int free_bytes = Heap::MaxObjectSizeInPagedSpace(); |
- CHECK(Heap::CollectGarbage(free_bytes, NEW_SPACE)); |
+ Heap::CollectGarbage(NEW_SPACE); |
Address current_top = Heap::new_space()->top(); |
Page* page = Page::FromAddress(current_top); |