[webkit-changes] [56710] trunk/WebCore

Eric Seidel eric at webkit.org
Mon Mar 29 11:07:01 PDT 2010


Agreed.  My mistake.  I should have caught such in review.

Can we kill DEFINE_STATIC_LOCAL yet?  It was originally to work around
a GCC bug.  However maybe there are reasons why we still need it these
days?

Is it to make shut-down faster by preventing destructors from running?

-eric

On Mon, Mar 29, 2010 at 10:04 AM, Dan Bernstein <mitz at apple.com> wrote:
>
> On Mar 29, 2010, at 12:41 AM, philn at webkit.org wrote:
>
> Revision 56710 Author philn at webkit.org Date 2010-03-29 00:41:01 -0700 (Mon,
> 29 Mar 2010)
>
>
> -    static HashSet<String> cache;
> -    static bool typeListInitialized = false;
> +    DEFINE_STATIC_LOCAL(HashSet<String>, cache, ());
> +    DEFINE_STATIC_LOCAL(bool, typeListInitialized, (false));
>
> This will allocate the boolean on the heap. There is no reason to do so.
> DEFINE_STATIC_LOCAL only makes sense for objects that have destructors.


More information about the webkit-changes mailing list