Chromium Code Reviews
Description[SVG Fonts] Fix <font-face> element leak document
Reported by hajimehoshi@: A svg document with <font-face> was never destructed from a reference cycle.
This patch breaks the reference cycle by making the reference from SVGFontFaceSource to SVGFontFaceElement weak.
SVGFontFaceSource only exist for in-document font face reference, so this change is safe.
This patch also validates SVGFontData's weak-ref to SVGFontFaceElement. SVGFontData should be only used while the document is alive. This CL changes the weak-ref to WeakPtr and ensure the svg tree is alive before reference.
TEST=LayoutTests/svg/svg-font-face-leak-document.html
BUG=270000
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171231
Patch Set 1 #Patch Set 2 : add_testcase #Patch Set 3 : conservative fix? #Patch Set 4 : upd #Patch Set 5 : rebased #
Total comments: 2
Patch Set 6 : assert on getter #Patch Set 7 : Editing bug workaround #
Total comments: 2
Patch Set 8 : rebased / add comment #Patch Set 9 : rebased #Messages
Total messages: 17 (0 generated)
|