Bug 225390

Summary: Use WeakHashSet instead of HashSet of raw pointers in Document and SVGDocumentExtensions
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Severity: Normal CC: cdumez, changseok, dino, esprehn+autocc, ews-watchlist, fmalita, ggaren, gyuyoung.kim, kangil.han, koivisto, pdr, sabouhallawa, schenney, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=225440
Description Flags
Patch none

Description Ryosuke Niwa 2021-05-05 03:22:32 PDT
In Document and SVGDocumentExtensions, there are a few HashSet of elements. Use WeakHashSet instead.
Comment 1 Ryosuke Niwa 2021-05-05 03:32:28 PDT
Created attachment 427751 [details]
Comment 2 Ryosuke Niwa 2021-05-05 03:33:57 PDT
Comment on attachment 427751 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=427751&action=review

> Source/WebCore/svg/SVGDocumentExtensions.h:88
>      HashMap<SVGElement*, std::unique_ptr<HashSet<SVGElement*>>> m_elementDependencies;

I'd address this in a separate patch since it's a bit more involved.
Comment 3 EWS 2021-05-05 06:14:35 PDT
Committed r277013 (237329@main): <https://commits.webkit.org/237329@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427751 [details].
Comment 4 Radar WebKit Bug Importer 2021-05-05 06:15:18 PDT