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

Side by Side Diff: third_party/WebKit/Source/wtf/text/AtomicStringTable.h

Issue 2103373002: Don't lazy allocate the AtomicStringTable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WTF_AtomicStringTable_h
6 #define WTF_AtomicStringTable_h
7
8 #include "wtf/Allocator.h"
9 #include "wtf/HashSet.h"
10 #include "wtf/text/StringHash.h"
11 #include "wtf/text/StringImpl.h"
12
13 namespace WTF {
14
15 // The underlying storage that keeps the map of unique AtomicStrings. This is
16 // not thread safe and each WTFThreadData has one.
17 class AtomicStringTable {
18 USING_FAST_MALLOC(AtomicStringTable);
19 WTF_MAKE_NONCOPYABLE(AtomicStringTable);
20 public:
21 AtomicStringTable();
22 ~AtomicStringTable();
23
24 StringImpl* addStringImpl(StringImpl*);
25
26 HashSet<StringImpl*>& table() { return m_table; }
27
28 private:
29 HashSet<StringImpl*> m_table;
30 };
31
32 } // namespace WTF
33
34 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/AtomicString.cpp ('k') | third_party/WebKit/Source/wtf/text/AtomicStringTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698