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

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

Issue 1904003002: CrossThreadPersistentRegion will only trace objects belonging to the current GCing ThreadHeap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 | « no previous file | third_party/WebKit/Source/platform/heap/PersistentNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7b94bbe75cd648efd4afae60c592ced48c85b665..52b558084cb0772fac38b2915c8fc591c9e614d5 100644
--- a/third_party/WebKit/Source/platform/heap/PersistentNode.h
+++ b/third_party/WebKit/Source/platform/heap/PersistentNode.h
@@ -150,8 +150,11 @@ public:
#endif
}
+ static bool shouldTracePersistentNode(Visitor*, PersistentNode*) { return true; }
+
void releasePersistentNode(PersistentNode*, ThreadState::PersistentClearCallback);
- void tracePersistentNodes(Visitor*);
+ using ShouldTraceCallback = bool (*)(Visitor*, PersistentNode*);
+ void tracePersistentNodes(Visitor*, ShouldTraceCallback = PersistentRegion::shouldTracePersistentNode);
int numberOfPersistents();
private:
@@ -186,11 +189,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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/PersistentNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698