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

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: 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
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..47f7b61f1a246c38479ac2fdea12d04c54fc20db 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(AtomicString::createAtomicStringTable())
, m_cachedConverterICU(adoptPtr(new ICUConverterWrapper))
{
}
WTFThreadData::~WTFThreadData()
{
- if (m_atomicStringTableDestructor)
- m_atomicStringTableDestructor(m_atomicStringTable);
+ AtomicString::destroyAtomicStringTable(m_atomicStringTable);
+}
+
+void WTFThreadData::createData()
+{
+ ASSERT(!s_staticData);
+ s_staticData = new ThreadSpecific<WTFThreadData>;
}
} // namespace WTF

Powered by Google App Engine
This is Rietveld 408576698