| Index: third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/PersistentNode.h b/third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| index 62d176d18f1ff5cc9fd0b762e6645167223de631..42147dd3a9e0818aba90d12307880d5a4fa80837 100644
|
| --- a/third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| +++ b/third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| @@ -149,7 +149,8 @@ public:
|
| --m_persistentCount;
|
| #endif
|
| }
|
| - void tracePersistentNodes(Visitor*);
|
| + using ShouldTraceCallback = bool (*)(Visitor*, PersistentNode*);
|
| + void tracePersistentNodes(Visitor*, ShouldTraceCallback = nullptr);
|
| int numberOfPersistents();
|
|
|
| private:
|
| @@ -184,11 +185,13 @@ public:
|
| void tracePersistentNodes(Visitor* visitor)
|
| {
|
| MutexLocker lock(m_mutex);
|
| - m_persistentRegion->tracePersistentNodes(visitor);
|
| + m_persistentRegion->tracePersistentNodes(visitor, CrossThreadPersistentRegion::shouldTracePersistentNode);
|
| }
|
|
|
| void prepareForThreadStateTermination(ThreadState*);
|
|
|
| + static bool shouldTracePersistentNode(Visitor*, PersistentNode*);
|
| +
|
| private:
|
| // We don't make CrossThreadPersistentRegion inherit from PersistentRegion
|
| // because we don't want to virtualize performance-sensitive methods
|
|
|