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

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: Remove 'typename' that Win compiler does not like 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
« no previous file with comments | « Source/wtf/HashTraits.h ('k') | Source/wtf/ListHashSet.h » ('j') | 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..d9668a800182de801e4912d02aaecb0bb28b0058 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;
@@ -324,7 +324,12 @@ struct LinkedHashSetTraits : public SimpleClassHashTraits<LinkedHashSetNode<Valu
struct NeedsTracingLazily {
static const bool value = ValueTraits::template NeedsTracingLazily<>::value;
};
- static const bool isWeak = ValueTraits::isWeak;
+ static const WeakHandlingFlag weakHandlingFlag = ValueTraits::weakHandlingFlag;
+ template<typename Visitor>
+ static bool shouldRemoveFromCollection(Visitor* visitor, LinkedHashSetNode<Value>& node)
+ {
+ return ValueTraits::shouldRemoveFromCollection(visitor, node.m_value);
+ }
};
template<typename LinkedHashSetType>
@@ -670,11 +675,6 @@ inline void LinkedHashSet<T, U, V, W>::remove(ValuePeekInType value)
remove(find(value));
}
-template<typename T>
-struct IsWeak<LinkedHashSetNode<T> > {
- static const bool value = IsWeak<T>::value;
-};
-
inline void swap(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b)
{
swap(a.m_prev, b.m_prev);
« no previous file with comments | « Source/wtf/HashTraits.h ('k') | Source/wtf/ListHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698