Move the shared LineBreakIteratorPool from ThreadGlobalData into its own ThreadSpecific
[WebKit-https.git] / Source / WebCore / platform / ThreadGlobalData.cpp
index 90933b9c3b0f0598aa594c60a95b1b185d118c72..a97a7783749e62684c536b545c155d740696c2bd 100644 (file)
 
 #include "EventNames.h"
 #include "ThreadTimers.h"
+#include <wtf/MainThread.h>
 #include <wtf/UnusedParam.h>
 #include <wtf/WTFThreadData.h>
 #include <wtf/text/StringImpl.h>
 
 #if USE(ICU_UNICODE)
-#include "LineBreakIteratorPoolICU.h"
 #include "TextCodecICU.h"
 #endif
 
@@ -82,15 +82,6 @@ ThreadGlobalData::~ThreadGlobalData()
     destroy();
 }
 
-#if USE(ICU_UNICODE)
-LineBreakIteratorPool& ThreadGlobalData::lineBreakIteratorPool()
-{
-    if (!m_lineBreakIteratorPool)
-        m_lineBreakIteratorPool = LineBreakIteratorPool::create();
-    return *m_lineBreakIteratorPool;
-}
-#endif
-
 void ThreadGlobalData::destroy()
 {
 #if PLATFORM(MAC)
@@ -101,7 +92,6 @@ void ThreadGlobalData::destroy()
 #if USE(ICU_UNICODE)
     delete m_cachedConverterICU;
     m_cachedConverterICU = 0;
-    m_lineBreakIteratorPool = nullptr;
 #endif
 
     delete m_eventNames;