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

Unified Diff: Source/core/dom/DocumentOrderedMap.h

Issue 467973003: Use an AtomicString as key in DocumentOrderedMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Source/core/dom/DocumentOrderedMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentOrderedMap.h
diff --git a/Source/core/dom/DocumentOrderedMap.h b/Source/core/dom/DocumentOrderedMap.h
index b843a2430641f2e89dba820545537120b3a86805..86a36f44fb59f59a06cc45a0a854912f340ed8fa 100644
--- a/Source/core/dom/DocumentOrderedMap.h
+++ b/Source/core/dom/DocumentOrderedMap.h
@@ -35,6 +35,7 @@
#include "wtf/Forward.h"
#include "wtf/HashMap.h"
#include "wtf/text/AtomicString.h"
+#include "wtf/text/AtomicStringHash.h"
#include "wtf/text/StringImpl.h"
namespace blink {
@@ -78,19 +79,19 @@ private:
WillBeHeapVector<RawPtrWillBeMember<Element> > orderedList;
};
- typedef WillBeHeapHashMap<StringImpl*, OwnPtrWillBeMember<MapEntry> > Map;
+ typedef WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<MapEntry> > Map;
mutable Map m_map;
};
inline bool DocumentOrderedMap::contains(const AtomicString& id) const
{
- return m_map.contains(id.impl());
+ return m_map.contains(id);
}
inline bool DocumentOrderedMap::containsMultiple(const AtomicString& id) const
{
- Map::const_iterator it = m_map.find(id.impl());
+ Map::const_iterator it = m_map.find(id);
return it != m_map.end() && it->value->count > 1;
}
« no previous file with comments | « no previous file | Source/core/dom/DocumentOrderedMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698