Changeset 92553 in webkit
- Timestamp:
- Aug 6, 2011, 10:00:48 AM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r92552 r92553 1 2011-08-06 Dan Bernstein <mitz@apple.com> 2 3 Move the shared LineBreakIteratorPool from ThreadGlobalData into its own ThreadSpecific 4 https://bugs.webkit.org/show_bug.cgi?id=65809 5 6 Reviewed by Darin Adler and Sam Weinig. 7 8 * platform/ThreadGlobalData.cpp: 9 (WebCore::ThreadGlobalData::destroy): Removed code to clear the m_lineBreakIteratorPool member 10 variable, which was removed. 11 * platform/ThreadGlobalData.h: Removed lineBreakIteratorPool() and associated member variable. 12 * platform/text/LineBreakIteratorPoolICU.h: 13 (WebCore::LineBreakIteratorPool::sharedPool): Changed to return a thread-specific pool. 14 1 15 2011-08-06 Joseph Pecoraro <joepeck@webkit.org> 2 16 -
trunk/Source/WebCore/platform/ThreadGlobalData.cpp
r92068 r92553 36 36 37 37 #if USE(ICU_UNICODE) 38 #include "LineBreakIteratorPoolICU.h"39 38 #include "TextCodecICU.h" 40 39 #endif … … 84 83 } 85 84 86 #if USE(ICU_UNICODE)87 LineBreakIteratorPool& ThreadGlobalData::lineBreakIteratorPool()88 {89 if (!m_lineBreakIteratorPool)90 m_lineBreakIteratorPool = LineBreakIteratorPool::create();91 return *m_lineBreakIteratorPool;92 }93 #endif94 95 85 void ThreadGlobalData::destroy() 96 86 { … … 103 93 delete m_cachedConverterICU; 104 94 m_cachedConverterICU = 0; 105 m_lineBreakIteratorPool = nullptr;106 95 #endif 107 96 -
trunk/Source/WebCore/platform/ThreadGlobalData.h
r89878 r92553 43 43 44 44 class EventNames; 45 class LineBreakIteratorPool;46 45 class ThreadTimers; 47 46 … … 61 60 #if USE(ICU_UNICODE) 62 61 ICUConverterWrapper& cachedConverterICU() { return *m_cachedConverterICU; } 63 LineBreakIteratorPool& lineBreakIteratorPool();64 62 #endif 65 63 … … 78 76 #if USE(ICU_UNICODE) 79 77 ICUConverterWrapper* m_cachedConverterICU; 80 OwnPtr<LineBreakIteratorPool> m_lineBreakIteratorPool;81 78 #endif 82 79 -
trunk/Source/WebCore/platform/text/LineBreakIteratorPoolICU.h
r89878 r92553 28 28 29 29 #include "TextBreakIteratorInternalICU.h" 30 #include "ThreadGlobalData.h"31 30 #include <unicode/ubrk.h> 32 31 #include <wtf/Assertions.h> 33 32 #include <wtf/HashMap.h> 34 33 #include <wtf/PassOwnPtr.h> 34 #include <wtf/ThreadSpecific.h> 35 #include <wtf/text/AtomicString.h> 35 36 #include <wtf/text/CString.h> 36 37 … … 42 43 static LineBreakIteratorPool& sharedPool() 43 44 { 44 return threadGlobalData().lineBreakIteratorPool(); 45 static WTF::ThreadSpecific<LineBreakIteratorPool>* pool = new WTF::ThreadSpecific<LineBreakIteratorPool>; 46 return **pool; 45 47 } 46 48 … … 93 95 Pool m_pool; 94 96 HashMap<UBreakIterator*, AtomicString> m_vendedIterators; 97 98 friend WTF::ThreadSpecific<LineBreakIteratorPool>::operator LineBreakIteratorPool*(); 95 99 }; 96 100
Note:
See TracChangeset
for help on using the changeset viewer.