Index: third_party/WebKit/Source/wtf/text/AtomicString.h |
diff --git a/third_party/WebKit/Source/wtf/text/AtomicString.h b/third_party/WebKit/Source/wtf/text/AtomicString.h |
index e90a664e370ea9bf005d58da335beef49eae28dc..0e500e18af3b4d3337fd4218bbd4c881a20393d8 100644 |
--- a/third_party/WebKit/Source/wtf/text/AtomicString.h |
+++ b/third_party/WebKit/Source/wtf/text/AtomicString.h |
@@ -21,6 +21,7 @@ |
#ifndef AtomicString_h |
#define AtomicString_h |
+#include "wtf/HashSet.h" |
#include "wtf/HashTableDeletedValueType.h" |
#include "wtf/WTFExport.h" |
#include "wtf/text/CString.h" |
@@ -29,6 +30,7 @@ |
namespace WTF { |
struct AtomicStringHash; |
+class AtomicStringTable; |
class WTF_EXPORT AtomicString { |
public: |
@@ -182,6 +184,22 @@ private: |
static AtomicString fromUTF8Internal(const char*, const char*); |
}; |
+class AtomicStringTable { |
+ WTF_MAKE_NONCOPYABLE(AtomicStringTable); |
+public: |
+ StringImpl* addStringImpl(StringImpl*); |
+ |
+ HashSet<StringImpl*>& table() { return m_table; } |
+ |
+private: |
+ AtomicStringTable() = default; |
+ static AtomicStringTable* create(); |
+ static void destroy(AtomicStringTable*); |
+ friend class WTFThreadData; |
+ |
+ HashSet<StringImpl*> m_table; |
+}; |
+ |
inline bool operator==(const AtomicString& a, const AtomicString& b) { return a.impl() == b.impl(); } |
WTF_EXPORT bool operator==(const AtomicString&, const LChar*); |
inline bool operator==(const AtomicString& a, const char* b) { return WTF::equal(a.impl(), reinterpret_cast<const LChar*>(b)); } |