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

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
« Source/platform/heap/Heap.h ('K') | « Source/platform/heap/ThreadState.h ('k') | no next file » | 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 a1ea13a398166e3a82727aaa15339810fc7d4dc3..8020f0fecd954fee32fa34c65933aaaa3d5ed214 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -126,14 +126,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);
@@ -469,20 +469,20 @@ void ThreadState::incrementMarkedObjectsAge()
}
#endif
-void ThreadState::pushWeakPointerCallback(void* object, WeakPointerCallback callback)
+void ThreadState::pushThreadLocalWeakCallback(void* object, WeakPointerCallback 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;
}
@@ -882,7 +882,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");
« Source/platform/heap/Heap.h ('K') | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698