Closed
Bug 1163446
Opened 10 years ago
Closed 10 years ago
drop reference to FontFace once a FontFaceBufferSource is loaded
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
mozilla41
People
(Reporter: heycam, Assigned: heycam)
References
Details
Attachments
(1 file)
851 bytes,
patch
|
jtd
:
review+
|
Details | Diff | Splinter Review |
A FontFaceBufferSource encapsulates an ArrayBuffer(Source) for gfxUserFontSet. It holds a strong reference to the FontFace which initially owns the buffer. Once the gfxUserFontSet takes ownership of the buffer to parse it as a font, the FontFaceBufferSource no longer needs a reference to the FontFace.
Dropping the reference to the FontFace is needed for bug 1161413, where we can no longer rely on a call to FontFaceSet::DestroyUserFontSet at pres context destruction time to drop enough references so that we don't leak. Otherwise a simple document like this will leak:
<script>new FontFace("x", new ArrayBuffer(0))</script>
as the gfxUserFontSet holds on to the FontFace (through the FontFaceBufferSource in its mSrcList).
We could alternatively traverse/unlink the FontFace reference in FontFaceBufferSource from FontFaceSet's CC macros, but it's easier to just drop the reference here.
Attachment #8603895 -
Flags: review?(jdaggett)
Updated•10 years ago
|
Attachment #8603895 -
Flags: review?(jdaggett) → review+
![]() |
||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6325283ba40b
https://hg.mozilla.org/mozilla-central/rev/651e2c2015f6
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•