Index: Source/platform/heap/HeapTest.cpp |
diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp |
index 1309cddf5f5ba9aba34d6124711fd8468dcc55d5..a50f5361658f0088fa7e032b52315499f2e8b2ef 100644 |
--- a/Source/platform/heap/HeapTest.cpp |
+++ b/Source/platform/heap/HeapTest.cpp |
@@ -2017,7 +2017,7 @@ |
static OffHeapContainer* create() { return new OffHeapContainer(); } |
static const int iterations = 300; |
- static const int deadWrappers = 1500; |
+ static const int deadWrappers = 1800; |
OffHeapContainer() |
{ |
@@ -2026,6 +2026,7 @@ |
m_vector1.append(ShouldBeTraced(IntWrapper::create(i))); |
m_deque2.append(IntWrapper::create(i)); |
m_vector2.append(IntWrapper::create(i)); |
+ m_hashMap.add(i + 103, IntWrapper::create(i)); |
m_ownedVector.append(adoptPtr(new ShouldBeTraced(IntWrapper::create(i)))); |
} |
@@ -2033,6 +2034,7 @@ |
Vector<ShouldBeTraced>::iterator v1Iterator(m_vector1.begin()); |
Deque<Member<IntWrapper> >::iterator d2Iterator(m_deque2.begin()); |
Vector<Member<IntWrapper> >::iterator v2Iterator(m_vector2.begin()); |
+ HashMap<int, Member<IntWrapper> >::iterator mapIterator(m_hashMap.begin()); |
Vector<OwnPtr<ShouldBeTraced> >::iterator ownedVectorIterator(m_ownedVector.begin()); |
for (int i = 0; i < iterations; i++) { |
@@ -2043,16 +2045,21 @@ |
EXPECT_EQ(i, d2Iterator->get()->value()); |
EXPECT_EQ(i, v2Iterator->get()->value()); |
EXPECT_EQ(i, ownedVectorIterator->get()->m_wrapper->value()); |
+ int value = mapIterator->value.get()->value(); |
+ EXPECT_LE(0, value); |
+ EXPECT_GT(iterations, value); |
++d1Iterator; |
++v1Iterator; |
++d2Iterator; |
++v2Iterator; |
+ ++mapIterator; |
++ownedVectorIterator; |
} |
EXPECT_EQ(d1Iterator, m_deque1.end()); |
EXPECT_EQ(v1Iterator, m_vector1.end()); |
EXPECT_EQ(d2Iterator, m_deque2.end()); |
EXPECT_EQ(v2Iterator, m_vector2.end()); |
+ EXPECT_EQ(mapIterator, m_hashMap.end()); |
EXPECT_EQ(ownedVectorIterator, m_ownedVector.end()); |
} |
@@ -2062,6 +2069,7 @@ |
visitor->trace(m_vector1); |
visitor->trace(m_deque2); |
visitor->trace(m_vector2); |
+ visitor->trace(m_hashMap); |
visitor->trace(m_ownedVector); |
} |
@@ -2069,6 +2077,7 @@ |
Vector<ShouldBeTraced> m_vector1; |
Deque<Member<IntWrapper> > m_deque2; |
Vector<Member<IntWrapper> > m_vector2; |
+ HashMap<int, Member<IntWrapper> > m_hashMap; |
Vector<OwnPtr<ShouldBeTraced> > m_ownedVector; |
}; |