DrawTargetRecording::FillGlyph adds a UserData containing a reference to the Recording. This keeps the recordings alive as long as the ScaledFont is around. This is likely not the best. We only want the UserData around while we're recording. After we're done we don't need them anymore.
SourceSurfaces do this too which seems to be an even greater cause of staying around.
Created attachment 8871889 [details] [diff] [review] Clear user data after we're done with the recorder This helps keep us from accumulating all of the recorders. The basic idea is to track weak references to the SourceSurfaces and Fonts that we add UserData to in DrawEventRecorderPrivate and then clear these UserData's when we're done recording. This adds a RemoveAndDestroy helper to UserData to make this possible.
Assignee: nobody → jmuizelaar
Attachment #8871889 - Flags: review?(lsalzman)
Attachment #8871889 - Flags: review?(lsalzman) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/5f65427cd949 Clear user data after we're done with the recorder. r=lsalzman
Status: NEW → RESOLVED
Last Resolved: 10 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.