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

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

Issue 634243004: Oilpan: Simplify Heap::allocate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/ThreadState.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 9dcfd8d19d3ea408a74076f1fe0ce33f77ed4ee9..397aa183ef0a6c03d3ce06def612e235d99e76d0 100644
--- a/Source/platform/heap/HeapTest.cpp
+++ b/Source/platform/heap/HeapTest.cpp
@@ -228,7 +228,7 @@ static void getHeapStats(HeapStats* stats)
{
TestGCScope scope(ThreadState::NoHeapPointersOnStack);
EXPECT_TRUE(scope.allThreadsParked());
- Heap::getStats(stats);
+ Heap::getStatsForTesting(stats);
}
#define DEFINE_VISITOR_METHODS(Type) \
@@ -1602,7 +1602,6 @@ TEST(HeapTest, BasicFunctionality)
if (testPagesAllocated)
EXPECT_EQ(0ul, heapStats.totalAllocatedSpace() & (blinkPageSize - 1));
- DynamicallySizedObject* bigAreaRaw = bigArea;
// Clear the persistent, so that the big area will be garbage collected.
bigArea.release();
clearOutOldGarbage(&heapStats);
@@ -1614,17 +1613,6 @@ TEST(HeapTest, BasicFunctionality)
if (testPagesAllocated)
EXPECT_EQ(0ul, heapStats.totalAllocatedSpace() & (blinkPageSize - 1));
- // Endless loop unless we eventually get the memory back that we just freed.
- while (true) {
- Persistent<DynamicallySizedObject>* alloc = new Persistent<DynamicallySizedObject>(DynamicallySizedObject::create(big / 2));
- slack += 4;
- persistents[persistentCount++] = alloc;
- EXPECT_LT(persistentCount, numPersistents);
- total += big / 2;
- if (bigAreaRaw == alloc->get())
- break;
- }
-
getHeapStats(&heapStats);
CheckWithSlack(baseLevel + total, heapStats.totalObjectSpace(), slack);
if (testPagesAllocated)
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698