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

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

Issue 1166623002: Oilpan: Remove a visitor parameter from isHeapObjectAlive (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/TraceTraits.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 e4c8669990f7e6c3652fdec1903c184ca9ddc586..b643c4ecae245226d8bcb46c87af29c5f75c9005 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -904,13 +904,19 @@ void ThreadState::preSweep()
// Disallow allocation during weak processing.
NoAllocationScope noAllocationScope(this);
{
- TRACE_EVENT0("blink_gc", "ThreadState::threadLocalWeakProcessing");
// Perform thread-specific weak processing.
+ TRACE_EVENT0("blink_gc", "ThreadState::threadLocalWeakProcessing");
+ // TODO(haraken): It is wrong to unconditionally use
+ // s_markingVisitor, which is for GlobalMarking.
+ // ThreadTerminationGC should use a visitor for
+ // ThreadLocalMarking. However, a better fix is just to remove
+ // the visitor parameter. The only user of the visitor parameter
+ // is HashTable::process.
while (popAndInvokeThreadLocalWeakCallback(Heap::s_markingVisitor)) { }
}
{
TRACE_EVENT0("blink_gc", "ThreadState::invokePreFinalizers");
- invokePreFinalizers(*Heap::s_markingVisitor);
+ invokePreFinalizers();
}
}
@@ -1237,12 +1243,12 @@ void ThreadState::unregisterPreFinalizerInternal(void* target)
m_preFinalizers.remove(it);
}
-void ThreadState::invokePreFinalizers(Visitor& visitor)
+void ThreadState::invokePreFinalizers()
{
checkThread();
Vector<void*> deadObjects;
for (auto& entry : m_preFinalizers) {
- if (entry.value(entry.key, visitor))
+ if (entry.value(entry.key))
deadObjects.append(entry.key);
}
// FIXME: removeAll is inefficient. It can shrink repeatedly.
« no previous file with comments | « Source/platform/heap/ThreadState.h ('k') | Source/platform/heap/TraceTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698