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

Unified Diff: third_party/WebKit/Source/wtf/ListHashSet.h

Issue 2583363002: Tracing HeapListHashSet<> iterators. (Closed)
Patch Set: Created 4 years 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 | « third_party/WebKit/Source/platform/heap/HeapAllocator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/ListHashSet.h
diff --git a/third_party/WebKit/Source/wtf/ListHashSet.h b/third_party/WebKit/Source/wtf/ListHashSet.h
index 1c98df110f5a925a06b40833f13a92fc0a6f979d..7295dc934c282ab1b56eebbb97d5059f56a67883 100644
--- a/third_party/WebKit/Source/wtf/ListHashSet.h
+++ b/third_party/WebKit/Source/wtf/ListHashSet.h
@@ -538,6 +538,11 @@ class ListHashSetIterator {
operator const_iterator() const { return m_iterator; }
+ template <typename VisitorDispatcher>
+ void trace(VisitorDispatcher visitor) {
+ m_iterator.trace(visitor);
+ }
+
private:
Node* getNode() { return m_iterator.getNode(); }
@@ -595,6 +600,12 @@ class ListHashSetConstIterator {
return m_position != other.m_position;
}
+ template <typename VisitorDispatcher>
+ void trace(VisitorDispatcher visitor) {
+ visitor->trace(*m_set);
+ visitor->trace(m_position);
+ }
+
private:
Node* getNode() { return m_position; }
@@ -649,6 +660,11 @@ class ListHashSetReverseIterator {
operator const_reverse_iterator() const { return m_iterator; }
+ template <typename VisitorDispatcher>
+ void trace(VisitorDispatcher visitor) {
+ m_iterator.trace(visitor);
haraken 2016/12/20 02:53:05 Just to confirm: This iterator is just pointing to
sof 2016/12/20 06:37:08 Yes, the nodes in this list are separately allocat
+ }
+
private:
Node* getNode() { return m_iterator.node(); }
@@ -706,6 +722,12 @@ class ListHashSetConstReverseIterator {
return m_position != other.m_position;
}
+ template <typename VisitorDispatcher>
+ void trace(VisitorDispatcher visitor) {
+ visitor->trace(*m_set);
+ visitor->trace(m_position);
+ }
+
private:
Node* getNode() { return m_position; }
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapAllocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698