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

Unified Diff: Source/platform/heap/HeapTest.cpp

Issue 1159773004: Oilpan: Implement a GC to take a heap snapshot (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/MarkingVisitorImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/HeapTest.cpp
diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp
index 84e87846c2fa4848d103ee37333d8e1a9c7f5aac..f1ae466c8cfde41d0daef4cac9c3ff444fe3a65b 100644
--- a/Source/platform/heap/HeapTest.cpp
+++ b/Source/platform/heap/HeapTest.cpp
@@ -522,6 +522,8 @@ protected:
atomicIncrement(&m_gcCount);
}
+ // Taking snapshot shouldn't have any bad side effect.
+ Heap::collectGarbage(ThreadState::NoHeapPointersOnStack, ThreadState::TakeSnapshot, Heap::ForcedGC);
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack, ThreadState::GCWithSweep, Heap::ForcedGC);
EXPECT_EQ(wrapper->value(), 0x0bbac0de);
EXPECT_EQ((*globalPersistent)->value(), 0x0ed0cabb);
@@ -566,6 +568,8 @@ private:
atomicIncrement(&m_gcCount);
}
+ // Taking snapshot shouldn't have any bad side effect.
+ Heap::collectGarbage(ThreadState::NoHeapPointersOnStack, ThreadState::TakeSnapshot, Heap::ForcedGC);
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack, ThreadState::GCWithSweep, Heap::ForcedGC);
EXPECT_TRUE(weakMap->isEmpty());
EXPECT_TRUE(weakMap2.isEmpty());
@@ -3636,7 +3640,7 @@ TEST(HeapTest, CheckAndMarkPointer)
// This is a low-level test where we call checkAndMarkPointer. This method
// causes the object start bitmap to be computed which requires the heap
// to be in a consistent state (e.g. the free allocation area must be put
- // into a free list header). However when we call makeConsistentForSweeping it
+ // into a free list header). However when we call makeConsistentForGC it
// also clears out the freelists so we have to rebuild those before trying
// to allocate anything again. We do this by forcing a GC after doing the
// checkAndMarkPointer tests.
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/MarkingVisitorImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698