mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
648484651d
GTK should be used only from the main thread, but the specific symptom before this change was that creating a GtkEntry causes pango_cairo_font_map_get_default() to be called. This function returns a different font map on each thread. The font map is leaked when StyleThreads are leaked at exit. Font caches are usually expensive and so using the existing font map on the main thread is preferable. A GtkEntry already exists on the main thread, as well as style contexts for most other system fonts, and so it is more efficient to create these on the main thread while the style contexts exist. Doing this also avoids the need for Gecko_nsFont_InitSystem() to hold a global lock to avoid concurrently calling into GTK through LookAndFeel::GetColor(). MozReview-Commit-ID: DSOwEUeYmtV --HG-- extra : rebase_source : 971bc565e465b2d2482308006f68451ecaa6e264 |
||
---|---|---|
.. | ||
gtest | ||
mochitest | ||
unit |