Index: Source/platform/heap/PersistentNode.cpp |
diff --git a/Source/platform/heap/PersistentNode.cpp b/Source/platform/heap/PersistentNode.cpp |
index 6271f7d6ea72c36c01868d2a242d3f18b4db3406..2e986858b4579d76d6fa38937409518a711f09c6 100644 |
--- a/Source/platform/heap/PersistentNode.cpp |
+++ b/Source/platform/heap/PersistentNode.cpp |
@@ -92,6 +92,13 @@ void PersistentRegion::tracePersistentNodes(Visitor* visitor) |
ASSERT(persistentCount == m_persistentCount); |
} |
+namespace { |
+class GCObject final : public GarbageCollected<GCObject> { |
+public: |
+ DEFINE_INLINE_TRACE() { } |
+}; |
+} |
+ |
void CrossThreadPersistentRegion::prepareForThreadStateTermination(ThreadState* threadState) |
{ |
// For heaps belonging to a thread that's detaching, any cross-thread persistents |
@@ -99,9 +106,6 @@ void CrossThreadPersistentRegion::prepareForThreadStateTermination(ThreadState* |
// heap reference. |
MutexLocker lock(m_mutex); |
- class Object; |
- using GCObject = GarbageCollected<Object>; |
- |
// TODO(sof): consider ways of reducing overhead. (e.g., tracking number of active |
// CrossThreadPersistent<>s pointing into the heaps of each ThreadState and use that |
// count to bail out early.) |