Bug 71232 - [chromium] Calling methods of WebFontImpl causes assertions
Summary: [chromium] Calling methods of WebFontImpl causes assertions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-31 12:33 PDT by yzshen
Modified: 2011-10-31 17:27 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.26 KB, patch)
2011-10-31 13:05 PDT, yzshen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yzshen 2011-10-31 12:33:54 PDT
Some of the methods in WebKit/chromium/src/WebFontImpl.{h,cpp} should use FontCachePurgePreventer, so that they won't trigger assertions in FontCache::getCachedFontData().

I will upload a patch very soon.
Comment 1 yzshen 2011-10-31 13:05:53 PDT
Created attachment 113074 [details]
Patch
Comment 2 Michael Saboff 2011-10-31 13:56:32 PDT
Although not a Chromium expert, these look right.
Comment 3 James Robinson 2011-10-31 14:20:16 PDT
When are these calls failing? Is it possible to construct a test?
Comment 4 yzshen 2011-10-31 15:01:11 PDT
All these calls are possible to reach FontCache::getCachedFontData(), which requires a FontCachePurgePreventer on the stack. I talked with Michael (who is the author of FontCachePurgePreventer and CC-ed in this bug) and we agreed that this was the correct way to fix the issue.

But unfortunately I don't know much about how to create tests for it.
Comment 5 Michael Saboff 2011-10-31 15:10:54 PDT
Although not a test per se, there is an ASSERT that will fail in the case that a FontCachePurgePreventer is not active somewhere in the call chain when a fallback font is allocated.
Comment 6 James Robinson 2011-10-31 15:15:29 PDT
Comment on attachment 113074 [details]
Patch

OK, these look fine to me as well. Thanks for the information.
Comment 7 yzshen 2011-10-31 15:19:31 PDT
Thanks for your help, James and Michael!
Comment 8 WebKit Review Bot 2011-10-31 17:27:49 PDT
Comment on attachment 113074 [details]
Patch

Clearing flags on attachment: 113074

Committed r98921: <http://trac.webkit.org/changeset/98921>
Comment 9 WebKit Review Bot 2011-10-31 17:27:53 PDT
All reviewed patches have been landed.  Closing bug.