[Webkit-unassigned] [Bug 190467] Use finer grained locking in FontDatabase

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 11 11:12:05 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=190467

--- Comment #3 from Antti Koivisto <koivisto at iki.fi> ---
> Wouldn't moving the lock_guard to after the call to foldCase have the same
> result?  we could leave the call to ensure as it is.

No, the lock needs to be free during the CTFont stuff, that's the slow part (but inherently thread safe). 

We lookup the cache with the lock held. If we don't find anything we free the lock and do the CTFont dance. Then we retake the lock to add it to the cache (which might not do anything because other thread might have already added this font).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181011/1f63bb27/attachment-0001.html>


More information about the webkit-unassigned mailing list