DescriptionAvoid RefPtr cycle between FontPlatformData and HarfBuzzFace
When retrieving getScaledFont() from HarfBuzzFace we were creating a
SimpleFontData and assigning it to the HarfBuzzFontData object that is
kept as the user data pointer for HarfBuzz callbacks. This introduces a
reference counting cycle since SimpleFontData owns the FontPlatformData
it was created from, and harfBuzzFace() is retrieved from
FontPlatformData itself.
Since getScaledFont() is called on a HarfBuzzFace instance that is
retrieved from FontPlatformData and only used for one shaping iteration,
reducing the link to SimpleFontData to a non owning pointer should be
acceptable.
BUG=617637
R=eae,tzik,kojii
Committed: https://crrev.com/b6d1c182819aece33f03b138092445440d2f0adf
Cr-Commit-Position: refs/heads/master@{#398059}
Patch Set 1 #
Messages
Total messages: 10 (4 generated)
|