Bug 189147 - svg/W3C-SVG-1.1/render-groups-03-t.svg and some other SVG tests leak documents
Summary: svg/W3C-SVG-1.1/render-groups-03-t.svg and some other SVG tests leak documents
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-29 22:33 PDT by Simon Fraser (smfr)
Modified: 2018-09-19 03:11 PDT (History)
8 users (show)

See Also:


Attachments
Patch showing how to use RefToken tracking on SVGFontFaceElements (3.47 KB, patch)
2018-09-08 20:29 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (7.15 KB, patch)
2018-09-08 21:07 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2018-08-29 22:33:32 PDT
Seems like there's one Node left which references the doc:

SVGDocument 0x28a401268 3 (refCount 0, referencingNodeCount 1) file:///Volumes/Data/Development/apple/webkit/OpenSource/LayoutTests/svg/W3C-SVG-1.1/render-groups-03-t.svg
Comment 1 Simon Fraser (smfr) 2018-09-08 20:20:06 PDT
There's an SVGFontFaceElement that doesn't go away.
Comment 2 Simon Fraser (smfr) 2018-09-08 20:29:19 PDT
Created attachment 349276 [details]
Patch showing how to use RefToken tracking on SVGFontFaceElements
Comment 3 Simon Fraser (smfr) 2018-09-08 20:54:29 PDT
There's a retain cycle:

3   0x107903384 WTF::RefPtr<WebCore::SVGFontFaceElement, WTF::DumbPtrTraits<WebCore::SVGFontFaceElement> >::RefPtr(WebCore::SVGFontFaceElement*)
4   0x1078db8ed WTF::RefPtr<WebCore::SVGFontFaceElement, WTF::DumbPtrTraits<WebCore::SVGFontFaceElement> >::RefPtr(WebCore::SVGFontFaceElement*)
5   0x1078db696 WebCore::CSSFontFaceSource::CSSFontFaceSource(WebCore::CSSFontFace&, WTF::String const&, WebCore::CachedFont*, WebCore::SVGFontFaceElement*, WTF::RefPtr<JSC::ArrayBufferView, WTF::DumbPtrTraits<JSC::ArrayBufferView> >&&)
6   0x1078dbb9d WebCore::CSSFontFaceSource::CSSFontFaceSource(WebCore::CSSFontFace&, WTF::String const&, WebCore::CachedFont*, WebCore::SVGFontFaceElement*, WTF::RefPtr<JSC::ArrayBufferView, WTF::DumbPtrTraits<JSC::ArrayBufferView> >&&)
7   0x1078cc4f6 WebCore::CSSFontFace::appendSources(WebCore::CSSFontFace&, WebCore::CSSValueList&, WebCore::Document*, bool)
8   0x1078de81d WebCore::CSSFontSelector::addFontFaceRule(WebCore::StyleRuleFontFace&, bool)
9   0x1078ddd9d WebCore::CSSFontSelector::buildCompleted()


Document -> CSSFontSelector -> CSSFontFaceSource -> SVGFontFaceElement -> Document.
Comment 4 Radar WebKit Bug Importer 2018-09-08 20:54:55 PDT
<rdar://problem/44269623>
Comment 5 Simon Fraser (smfr) 2018-09-08 21:07:50 PDT
Created attachment 349282 [details]
Patch
Comment 6 WebKit Commit Bot 2018-09-10 14:19:59 PDT
Comment on attachment 349282 [details]
Patch

Clearing flags on attachment: 349282

Committed r235862: <https://trac.webkit.org/changeset/235862>
Comment 7 WebKit Commit Bot 2018-09-10 14:20:01 PDT
All reviewed patches have been landed.  Closing bug.