[Webkit-unassigned] [Bug 99430] New: hb_face_t instances should not depend on FontPlatformData itself

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 16 00:49:24 PDT 2012


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

           Summary: hb_face_t instances should not depend on
                    FontPlatformData itself
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bashi at chromium.org


The lifetime of hb_face_t instances should correspond with the lifetime of underlying font data(e.g. SkTypeface and CTFont). HarfBuzzNGFace has its cache mechanism to allow hb_face_t instances live as long as underlying font data live. Since the lifetime of underlying font data and FontPlatformData are different, hb_face_t instances should not depend on FontPlatformData.

harfbuzzSkiaGetTable(), harfbuzzCoreTextGetTable() and harfbuzzCairoGetTable() violate this restriction. These functions uses FontPlatformData to get font tables. We should pass underlying font data (or handle of underlying font data) to these functions instead. Otherwise, these functions can access freed FontPlatformData objects (http://crbug.com/156015 is an instance).

Note: we can use FontPlatformData in HarfBuzzNGFace::createFont(). This should be safe.
Note: we need not add a reference to underlying font data because the cache mechanism takes care of it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list