Bug 225390 - Use WeakHashSet instead of HashSet of raw pointers in Document and SVGDocumentExtensions
Summary: Use WeakHashSet instead of HashSet of raw pointers in Document and SVGDocumen...
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
Keywords: InRadar
Depends on:
Reported: 2021-05-05 03:22 PDT by Ryosuke Niwa
Modified: 2021-05-06 02:30 PDT (History)
15 users (show)

See Also:

Patch (26.56 KB, patch)
2021-05-05 03:32 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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