Closed
Bug 1162855
Opened 9 years ago
Closed 9 years ago
FontFaceSet should traverse its mUserFontSet's mFontFaceSet back pointer
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: heycam, Assigned: heycam)
References
Details
Attachments
(1 file)
1.71 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
We currently don't traverse a FontFaceSet::mUserFontSet->mFontFaceSet. It doesn't matter now, since in nsPresContext::Destroy we will call DestroyUserFontSet() on the FontFaceSet, which will clear both FontFaceSet::mUserFontSet->mFontFaceSet and FontFaceSet::mUserFontSet. But in 1161413 I plan to allow FontFaceSets to remain usable even after (or without) a pres context goes away.
Assignee | ||
Comment 1•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=242f8f79a455
Assignee | ||
Comment 2•9 years ago
|
||
Comment 3•9 years ago
|
||
Comment on attachment 8603186 [details] [diff] [review] patch Hmm, I need to now go through the ownership model here. Why are we explicitly traversing/unlinking a member variable of mUserFontSet. Why can't we just traverse/unlink mUserFontSet, and let its implementation to traverse/unlink mFontFaceSet?
Assignee | ||
Comment 4•9 years ago
|
||
FontFaceSet::UserfontSet inherits from gfxUserFontSet. And as I understand it no gfx classes are cycle collected and there is a desire to keep it that way. I couldn't see a way to keep gfxUserFontSet being a plain recounted class but have its derived class be cycle collected.
Assignee | ||
Comment 5•9 years ago
|
||
*refcounted (sorry on phone)
Comment 6•9 years ago
|
||
But it is always FontFaceSet::mUserFontSet which owns one particular instance of FontFaceSet::UserfontSet? The instance isn't shared by multiple FontFaceSets? (we must be sure to not traverse some field too many times, in this case mUserFontSet->mFontFaceSet)
Flags: needinfo?(cam)
Comment 7•9 years ago
|
||
Comment on attachment 8603186 [details] [diff] [review] patch Ok, looks like FontFaceSet::EnsureUserFontSet always creates a new UserFontSet per FontFaceSet object, so this should be fine.
Attachment #8603186 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 8•9 years ago
|
||
Thanks, yeah each FontFaceSet gets its own FontFaceSet::UserFontSet.
Flags: needinfo?(cam)
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 9•9 years ago
|
||
Patch doesn't have a commit message; guess I should check it in myself.
Keywords: checkin-needed
Comment 11•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c2315e5bc62d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•