Skip to content

Re-name the RefSetCache class to RefMap - #21737

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:RefMap
Aug 9, 2026
Merged

Re-name the RefSetCache class to RefMap#21737
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:RefMap

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

The RefSet and RefSetCache classes are old enough that they predate a lot of modern JavaScript features, e.g. originally they stored their data in regular Objects.
About six years ago, see PRs #11977 and #12089, these classes were converted to use a Set respectively a Map internally.

Given that RefSet is a wrapper around a standard Set, it seems reasonable to re-name RefSetCache to RefMap when it's a wrapper around a standard Map.

The `RefSet` and `RefSetCache` classes are old enough that they predate a lot of modern JavaScript features, e.g. originally they stored their data in regular Objects.
About six years ago, see PRs 11977 and 12089, these classes were converted to use a Set respectively a Map internally.

Given that `RefSet` is a wrapper around a standard Set, it seems reasonable to re-name `RefSetCache` to `RefMap` when it's a wrapper around a standard Map.
@codecov-commenter

codecov-commenter commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.08%. Comparing base (022e958) to head (ed327b2).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21737      +/-   ##
==========================================
+ Coverage   90.05%   90.08%   +0.03%     
==========================================
  Files         264      264              
  Lines       67094    67093       -1     
==========================================
+ Hits        60422    60442      +20     
+ Misses       6672     6651      -21     
Flag Coverage Δ
browsertest 66.32% <90.47%> (+0.02%) ⬆️
fonttest 9.03% <ø> (ø)
integrationtest 69.38% <80.95%> (+0.02%) ⬆️
unittest 58.34% <100.00%> (+<0.01%) ⬆️
unittestcli 56.70% <95.23%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timvandermeij
timvandermeij merged commit 7b63334 into mozilla:master Aug 9, 2026
21 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Good idea; thanks!

@Snuffleupagus
Snuffleupagus deleted the RefMap branch August 9, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants