Index: third_party/WebKit/Source/core/dom/NodeListsNodeData.h |
diff --git a/third_party/WebKit/Source/core/dom/NodeListsNodeData.h b/third_party/WebKit/Source/core/dom/NodeListsNodeData.h |
index 6fdf91b8f78b14f952c1e6740a7f1c184e4946a7..12d43d36aa2b6bde1870e1738555de55f34b39ff 100644 |
--- a/third_party/WebKit/Source/core/dom/NodeListsNodeData.h |
+++ b/third_party/WebKit/Source/core/dom/NodeListsNodeData.h |
@@ -65,21 +65,21 @@ class NodeListsNodeData final : public GarbageCollected<NodeListsNodeData> { |
struct NodeListAtomicCacheMapEntryHash { |
STATIC_ONLY(NodeListAtomicCacheMapEntryHash); |
static unsigned GetHash( |
- const std::pair<unsigned char, StringImpl*>& entry) { |
- return DefaultHash<StringImpl*>::Hash::GetHash(entry.second) + |
+ const std::pair<unsigned char, AtomicString>& entry) { |
+ return DefaultHash<AtomicString>::Hash::GetHash(entry.second) + |
entry.first; |
} |
- static bool Equal(const std::pair<unsigned char, StringImpl*>& a, |
- const std::pair<unsigned char, StringImpl*>& b) { |
+ static bool Equal(const std::pair<unsigned char, AtomicString>& a, |
+ const std::pair<unsigned char, AtomicString>& b) { |
return a == b; |
} |
static const bool safe_to_compare_to_empty_or_deleted = |
- DefaultHash<StringImpl*>::Hash::safe_to_compare_to_empty_or_deleted; |
+ DefaultHash<AtomicString>::Hash::safe_to_compare_to_empty_or_deleted; |
}; |
// Oilpan: keep a weak reference to the collection objects. |
// Object unregistration is handled by GC's weak processing. |
- typedef HeapHashMap<std::pair<unsigned char, StringImpl*>, |
+ typedef HeapHashMap<std::pair<unsigned char, AtomicString>, |
WeakMember<LiveNodeListBase>, |
NodeListAtomicCacheMapEntryHash> |
NodeListAtomicNameCacheMap; |
@@ -181,13 +181,10 @@ class NodeListsNodeData final : public GarbageCollected<NodeListsNodeData> { |
private: |
NodeListsNodeData() : child_node_list_(nullptr) {} |
- std::pair<unsigned char, StringImpl*> NamedNodeListKey( |
+ std::pair<unsigned char, AtomicString> NamedNodeListKey( |
CollectionType type, |
const AtomicString& name) { |
- // Holding the raw StringImpl is safe because |name| is retained by the |
- // NodeList and the NodeList is reponsible for removing itself from the |
- // cache on deletion. |
- return std::pair<unsigned char, StringImpl*>(type, name.Impl()); |
+ return std::pair<unsigned char, AtomicString>(type, name); |
} |
// Can be a ChildNodeList or an EmptyNodeList. |