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

Unified Diff: third_party/WebKit/Source/platform/heap/PersistentNode.h

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored Created 4 years, 11 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
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 f6ebddbfeca63fea2fd166576e6028f3a785378b..62338d88f1e56535b675b13f63711e121abb27bc 100644
--- a/third_party/WebKit/Source/platform/heap/PersistentNode.h
+++ b/third_party/WebKit/Source/platform/heap/PersistentNode.h
@@ -143,7 +143,7 @@ public:
--m_persistentCount;
#endif
}
- void tracePersistentNodes(Visitor*);
+ void tracePersistentNodes(Visitor*, bool (*shouldTrace)(Visitor*, PersistentNode*) = nullptr);
haraken 2016/01/28 15:52:50 Use typedef for the function signature.
keishi 2016/02/29 06:02:33 Done.
int numberOfPersistents();
private:
@@ -177,11 +177,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

Powered by Google App Engine
This is Rietveld 408576698