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

Unified Diff: Source/heap/Heap.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.h ('k') | Source/heap/HeapTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/heap/Heap.cpp
diff --git a/Source/heap/Heap.cpp b/Source/heap/Heap.cpp
index ab5f64e56b0483b29218bb59dafc3e710726a3a0..fc72e31561ac399e8a6dae596f0166ad3570e969 100644
--- a/Source/heap/Heap.cpp
+++ b/Source/heap/Heap.cpp
@@ -1179,9 +1179,9 @@ public:
visitHeader(header, header->payload(), callback);
}
- virtual void registerWeakMembers(const void* containingObject, WeakPointerCallback callback) OVERRIDE
+ virtual void registerWeakMembers(const void* closure, const void* containingObject, WeakPointerCallback callback) OVERRIDE
{
- Heap::pushWeakObjectPointerCallback(const_cast<void*>(containingObject), callback);
+ Heap::pushWeakObjectPointerCallback(const_cast<void*>(closure), const_cast<void*>(containingObject), callback);
}
virtual bool isMarked(const void* objectPointer) OVERRIDE
@@ -1274,13 +1274,13 @@ void Heap::pushWeakCellPointerCallback(void** cell, WeakPointerCallback callback
*slot = CallbackStack::Item(cell, callback);
}
-void Heap::pushWeakObjectPointerCallback(void* object, WeakPointerCallback callback)
+void Heap::pushWeakObjectPointerCallback(void* closure, void* object, WeakPointerCallback callback)
{
ASSERT(Heap::contains(object));
BaseHeapPage* heapPageForObject = reinterpret_cast<BaseHeapPage*>(pageHeaderAddress(reinterpret_cast<Address>(object)));
ASSERT(Heap::contains(object) == heapPageForObject);
ThreadState* state = heapPageForObject->threadState();
- state->pushWeakObjectPointerCallback(object, callback);
+ state->pushWeakObjectPointerCallback(closure, callback);
}
bool Heap::popAndInvokeWeakPointerCallback(Visitor* visitor)
« no previous file with comments | « Source/heap/Heap.h ('k') | Source/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698