Event names are used in classes that will be used in worker threads. It is probably impractical to attempt making atomic strings fully thread safe (usable from multiple threads at once), so each thread needs to have its own stringTable, and its own instance of global strings.
Created attachment 24836 [details]
Created attachment 24837 [details]
Oops, sent before saving...
Comment on attachment 24837 [details]
Any uses in WebKit outside of the "mac" and "win" directories?
Typo "Atimic" in one place.
What performance impact does this change have?
Why is the EventNames constructor public? Why is "int dummy" a member of EventNames? Just to allow the initialization macro to work? I think both the constructor and the dummy member should be private.
> : dummy (0)
There should be a space after the word "dummy" here?
> // Initialization is not thread safe, so this function must be called from the main thread first.
Why not assert this?
(In reply to comment #3)
> (From update of attachment 24837 [details] )
> Any uses in WebKit outside of the "mac" and "win" directories?
No, grepping didn't find anything else.
> What performance impact does this change have?
No change on PLT for me. Should I test anything else? I worried about a PLT regression, because this changed AtomicString construction and destruction, but event dispatching is probably not that hot - or is it?
> Why is "int dummy" a member of EventNames? Just to allow the initialization macro
> to work?
Yes, that's the reason.
Committed revision 38094.