Bug 262407 - Use `HashSet<CheckedRef<Range>>` instead of `WeakHashSet<Range>` for Document::m_ranges
Summary: Use `HashSet<CheckedRef<Range>>` instead of `WeakHashSet<Range>` for Document...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-09-29 15:03 PDT by Chris Dumez
Modified: 2023-09-29 17:24 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2023-09-29 15:03:07 PDT
Use `HashSet<CheckedRef<Range>>` instead of `WeakHashSet<Range>` for Document::m_ranges.
The Range destructor takes care of removing itself from Document::m_ranges already so we don't need a WeakPtr. Using CheckedRef here is slightly more efficient.
Comment 1 Chris Dumez 2023-09-29 15:04:28 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18441
Comment 2 EWS 2023-09-29 17:23:12 PDT
Committed 268680@main (cbb5cdba4811): <https://commits.webkit.org/268680@main>

Reviewed commits have been landed. Closing PR #18441 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-09-29 17:24:13 PDT
<rdar://problem/116263456>