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

Unified Diff: Source/wtf/LinkedHashSet.h

Issue 319593004: Oilpan:Allow custom handling of classes that contain weak pointers that are embedded in collections. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« Source/platform/heap/Visitor.h ('K') | « Source/wtf/HashTraits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/LinkedHashSet.h
diff --git a/Source/wtf/LinkedHashSet.h b/Source/wtf/LinkedHashSet.h
index eb235d4ee7de6cfe8608ece4834bc1e339b0c443..eec38082385e8a1ff35035862643269689a67b7d 100644
--- a/Source/wtf/LinkedHashSet.h
+++ b/Source/wtf/LinkedHashSet.h
@@ -307,7 +307,7 @@ struct LinkedHashSetTraits : public SimpleClassHashTraits<LinkedHashSetNode<Valu
static const bool emptyValueIsZero = true;
static const bool hasIsEmptyValueFunction = true;
- static bool isEmptyValue(const Node& value) { return !value.m_next; }
+ static bool isEmptyValue(const Node& node) { return !node.m_next; }
static const int deletedValue = -1;
@@ -325,6 +325,11 @@ struct LinkedHashSetTraits : public SimpleClassHashTraits<LinkedHashSetNode<Valu
static const bool value = ValueTraits::template NeedsTracingLazily<>::value;
};
static const bool isWeak = ValueTraits::isWeak;
+ template<typename Visitor>
+ static bool shouldRemoveFromCollection(Visitor* visitor, LinkedHashSetNode<Value>& node)
+ {
+ return ValueTraits::shouldRemoveFromCollection(visitor, node.m_value);
+ }
};
template<typename LinkedHashSetType>
« Source/platform/heap/Visitor.h ('K') | « Source/wtf/HashTraits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698