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

Unified Diff: third_party/WebKit/Source/wtf/WTFThreadData.cpp

Issue 1370113006: AtomicStringTable should not be initialized lazily Base URL: https://chromium.googlesource.com/chromium/src.git@AtomitStringTable
Patch Set: Export AtomicStringTable Created 5 years, 2 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 | « third_party/WebKit/Source/wtf/WTFThreadData.h ('k') | third_party/WebKit/Source/wtf/text/AtomicString.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/WTFThreadData.cpp
diff --git a/third_party/WebKit/Source/wtf/WTFThreadData.cpp b/third_party/WebKit/Source/wtf/WTFThreadData.cpp
index bef2b58fe4cb4981b3ff02d022028a81926bd4bc..3f076ecee9eb8565286341db989a594c2e43fb38 100644
--- a/third_party/WebKit/Source/wtf/WTFThreadData.cpp
+++ b/third_party/WebKit/Source/wtf/WTFThreadData.cpp
@@ -27,23 +27,28 @@
#include "config.h"
#include "wtf/WTFThreadData.h"
+#include "wtf/text/AtomicString.h"
#include "wtf/text/TextCodecICU.h"
namespace WTF {
-ThreadSpecific<WTFThreadData>* WTFThreadData::staticData;
+ThreadSpecific<WTFThreadData>* WTFThreadData::s_staticData;
WTFThreadData::WTFThreadData()
- : m_atomicStringTable(0)
- , m_atomicStringTableDestructor(0)
+ : m_atomicStringTable(AtomicStringTable::create())
, m_cachedConverterICU(adoptPtr(new ICUConverterWrapper))
{
}
WTFThreadData::~WTFThreadData()
{
- if (m_atomicStringTableDestructor)
- m_atomicStringTableDestructor(m_atomicStringTable);
+ AtomicStringTable::destroy(m_atomicStringTable);
+}
+
+void WTFThreadData::createData()
+{
+ ASSERT(!s_staticData);
+ s_staticData = new ThreadSpecific<WTFThreadData>;
}
} // namespace WTF
« no previous file with comments | « third_party/WebKit/Source/wtf/WTFThreadData.h ('k') | third_party/WebKit/Source/wtf/text/AtomicString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698