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

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

Issue 1149943003: Oilpan: Rename weak callback related methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/ThreadState.h ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.cpp
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
index c47c92bac6ba45ffcd42d4f139cde1877a0bc354..200c4897719ab1b3d121a373e46759d9bd29e593 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -125,14 +125,14 @@ ThreadState::ThreadState()
m_likelyToBePromptlyFreed = adoptArrayPtr(new int[likelyToBePromptlyFreedArraySize]);
clearHeapAges();
- m_weakCallbackStack = new CallbackStack();
+ m_threadLocalWeakCallbackStack = new CallbackStack();
}
ThreadState::~ThreadState()
{
checkThread();
- delete m_weakCallbackStack;
- m_weakCallbackStack = nullptr;
+ delete m_threadLocalWeakCallbackStack;
+ m_threadLocalWeakCallbackStack = nullptr;
for (int i = 0; i < NumberOfHeaps; ++i)
delete m_heaps[i];
deleteAllValues(m_interruptors);
@@ -468,20 +468,20 @@ void ThreadState::incrementMarkedObjectsAge()
}
#endif
-void ThreadState::pushWeakPointerCallback(void* object, WeakPointerCallback callback)
+void ThreadState::pushThreadLocalWeakCallback(void* object, WeakCallback callback)
{
- CallbackStack::Item* slot = m_weakCallbackStack->allocateEntry();
+ CallbackStack::Item* slot = m_threadLocalWeakCallbackStack->allocateEntry();
*slot = CallbackStack::Item(object, callback);
}
-bool ThreadState::popAndInvokeWeakPointerCallback(Visitor* visitor)
+bool ThreadState::popAndInvokeThreadLocalWeakCallback(Visitor* visitor)
{
// For weak processing we should never reach orphaned pages since orphaned
// pages are not traced and thus objects on those pages are never be
// registered as objects on orphaned pages. We cannot assert this here since
// we might have an off-heap collection. We assert it in
- // Heap::pushWeakPointerCallback.
- if (CallbackStack::Item* item = m_weakCallbackStack->pop()) {
+ // Heap::pushThreadLocalWeakCallback.
+ if (CallbackStack::Item* item = m_threadLocalWeakCallbackStack->pop()) {
item->call(visitor);
return true;
}
@@ -881,7 +881,7 @@ void ThreadState::preSweep()
{
TRACE_EVENT0("blink_gc", "ThreadState::threadLocalWeakProcessing");
// Perform thread-specific weak processing.
- while (popAndInvokeWeakPointerCallback(Heap::s_markingVisitor)) { }
+ while (popAndInvokeThreadLocalWeakCallback(Heap::s_markingVisitor)) { }
}
{
TRACE_EVENT0("blink_gc", "ThreadState::invokePreFinalizers");
« no previous file with comments | « Source/platform/heap/ThreadState.h ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698