Summary: | Move the shared LineBreakIteratorPool from ThreadGlobalData into its own ThreadSpecific | ||
---|---|---|---|
Product: | WebKit | Reporter: | mitz |
Component: | Text | Assignee: | mitz |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ap |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Attachments: |
Description
mitz
2011-08-06 00:41:44 PDT
Created attachment 103145 [details]
Remove ThreadGlobalData::lineBreakIteratorPool() and implement LineBreakIteratorPool::shared() using ThreadSpecific
Comment on attachment 103145 [details] Remove ThreadGlobalData::lineBreakIteratorPool() and implement LineBreakIteratorPool::shared() using ThreadSpecific View in context: https://bugs.webkit.org/attachment.cgi?id=103145&action=review > Source/WebCore/platform/text/LineBreakIteratorPoolICU.h:92 > + static WTF::ThreadSpecific<LineBreakIteratorPool>* staticPool; Since this is used only in one function it could be a static local to the function rather than a static data member. If it was, the function would not need an explicit check for null and we also would have no need for LineBreakIteratorPoolICU.cpp. Created attachment 103149 [details]
Remove ThreadGlobalData::lineBreakIteratorPool() and implement LineBreakIteratorPool::shared() using ThreadSpecific
Created attachment 103150 [details]
Remove ThreadGlobalData::lineBreakIteratorPool() and implement LineBreakIteratorPool::shared() using ThreadSpecific
Fixed in <http://trac.webkit.org/r92553>. I know what's bad about this approach (frameworks shouldn't waste thread specific keys). What's good about it? (In reply to comment #7) > I know what's bad about this approach (frameworks shouldn't waste thread specific keys). What's good about it? Making the LineBreakIteratorPool actually thread-specific even in ports that don’t enable HTML5 Worker Threads. In that configuration, ThreadGlobalData is shared between all threads in the process; however, LineBreakIteratorPools still need to be per-thread. |