Bug 22980 - WebCore uses more thread specific keys than it really needs
Summary: WebCore uses more thread specific keys than it really needs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-23 10:57 PST by Alexey Proskuryakov
Modified: 2008-12-23 23:48 PST (History)
0 users

See Also:


Attachments
proposed patch (29.14 KB, patch)
2008-12-23 12:47 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2008-12-23 10:57:15 PST
We should consolidate all ThreadSpecific objects into a single structure.
Comment 1 Alexey Proskuryakov 2008-12-23 12:47:15 PST
Created attachment 26229 [details]
proposed patch
Comment 2 Darin Adler 2008-12-23 13:07:12 PST
Comment on attachment 26229 [details]
proposed patch

> +#if PLATFORM(MAC)
> +    delete m_cachedConverterTEC;
> +#endif
> +#if USE(ICU_UNICODE)
> +    delete m_cachedConverterICU;
> +#endif
> +
> +    delete m_eventNames;
> +    delete m_atomicStringTable;
> +
> +    ASSERT(m_emptyString->hasOneRef());
> +    delete m_emptyString;
> +}

Why not use an OwnPtr?

r=me
Comment 3 Alexey Proskuryakov 2008-12-23 23:48:25 PST
Committed revision 39465.

With OwnPtr, I wouldn't be able to assert m_emptyString->hasOneRef(), which is a rather important check.