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

Unified Diff: Source/heap/HeapTest.cpp

Issue 197343003: Fix PersistentHeapHashMap to work with stack allocated, heap backed weak collections (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update comments. Created 6 years, 9 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/heap/Heap.cpp ('k') | Source/heap/Visitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/heap/HeapTest.cpp
diff --git a/Source/heap/HeapTest.cpp b/Source/heap/HeapTest.cpp
index 9cd048780a643d7955f177fcf0db06f2ac18d55e..2a974c9aeb99c0c2f0981230503cbdaa84367c29 100644
--- a/Source/heap/HeapTest.cpp
+++ b/Source/heap/HeapTest.cpp
@@ -156,7 +156,7 @@ public:
m_count++;
}
- virtual void registerWeakMembers(const void*, WeakPointerCallback) OVERRIDE { }
+ virtual void registerWeakMembers(const void*, const void*, WeakPointerCallback) OVERRIDE { }
virtual void registerWeakCell(void**, WeakPointerCallback) OVERRIDE { }
virtual bool isMarked(const void*) OVERRIDE { return false; }
@@ -400,9 +400,11 @@ private:
ThreadState::current()->safePoint(ThreadState::NoHeapPointersOnStack);
{
Persistent<HeapHashMap<ThreadMarker, WeakMember<IntWrapper> > > weakMap = new HeapHashMap<ThreadMarker, WeakMember<IntWrapper> >;
+ PersistentHeapHashMap<ThreadMarker, WeakMember<IntWrapper> > weakMap2;
for (int i = 0; i < numberOfAllocations; i++) {
weakMap->add(static_cast<unsigned>(i), IntWrapper::create(0));
+ weakMap2.add(static_cast<unsigned>(i), IntWrapper::create(0));
if (!(i % 10)) {
ThreadState::current()->safePoint(ThreadState::NoHeapPointersOnStack);
}
@@ -417,6 +419,7 @@ private:
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
EXPECT_TRUE(weakMap->isEmpty());
+ EXPECT_TRUE(weakMap2.isEmpty());
}
yield();
}
« no previous file with comments | « Source/heap/Heap.cpp ('k') | Source/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698