| Index: Source/platform/heap/HeapTest.cpp
|
| diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp
|
| index dea14ba019aa42244b2f26598daa6cf364853a34..30305a3f7027038edc6712f978a3791a4ba53ba5 100644
|
| --- a/Source/platform/heap/HeapTest.cpp
|
| +++ b/Source/platform/heap/HeapTest.cpp
|
| @@ -196,9 +196,8 @@ public:
|
| , m_parkedAllThreads(false)
|
| {
|
| m_state->checkThread();
|
| - EXPECT_FALSE(m_state->isInGC());
|
| if (LIKELY(ThreadState::stopThreads())) {
|
| - m_state->enterGC();
|
| + Heap::enterGC();
|
| m_parkedAllThreads = true;
|
| }
|
| }
|
| @@ -210,8 +209,7 @@ public:
|
| // Only cleanup if we parked all threads in which case the GC happened
|
| // and we need to resume the other threads.
|
| if (LIKELY(m_parkedAllThreads)) {
|
| - m_state->leaveGC();
|
| - EXPECT_FALSE(m_state->isInGC());
|
| + Heap::leaveGC();
|
| ThreadState::resumeThreads();
|
| }
|
| }
|
| @@ -3353,7 +3351,7 @@ TEST(HeapTest, CheckAndMarkPointer)
|
| {
|
| TestGCScope scope(ThreadState::HeapPointersOnStack);
|
| EXPECT_TRUE(scope.allThreadsParked()); // Fail the test if we could not park all threads.
|
| - Heap::prepareForGC();
|
| + Heap::preGC();
|
| Heap::flushHeapDoesNotContainCache();
|
| for (size_t i = 0; i < objectAddresses.size(); i++) {
|
| EXPECT_TRUE(Heap::checkAndMarkPointer(&visitor, objectAddresses[i]));
|
| @@ -3365,6 +3363,7 @@ TEST(HeapTest, CheckAndMarkPointer)
|
| EXPECT_TRUE(Heap::checkAndMarkPointer(&visitor, largeObjectEndAddress));
|
| EXPECT_EQ(2ul, visitor.count());
|
| visitor.reset();
|
| + Heap::postGC();
|
| }
|
| // This forces a GC without stack scanning which results in the objects
|
| // being collected. This will also rebuild the above mentioned freelists,
|
| @@ -3373,7 +3372,7 @@ TEST(HeapTest, CheckAndMarkPointer)
|
| {
|
| TestGCScope scope(ThreadState::HeapPointersOnStack);
|
| EXPECT_TRUE(scope.allThreadsParked());
|
| - Heap::prepareForGC();
|
| + Heap::preGC();
|
| Heap::flushHeapDoesNotContainCache();
|
| for (size_t i = 0; i < objectAddresses.size(); i++) {
|
| // We would like to assert that checkAndMarkPointer returned false
|
| @@ -3390,6 +3389,7 @@ TEST(HeapTest, CheckAndMarkPointer)
|
| Heap::checkAndMarkPointer(&visitor, largeObjectAddress);
|
| Heap::checkAndMarkPointer(&visitor, largeObjectEndAddress);
|
| EXPECT_EQ(0ul, visitor.count());
|
| + Heap::postGC();
|
| }
|
| // This round of GC is important to make sure that the object start
|
| // bitmap are cleared out and that the free lists are rebuild.
|
|
|