Skip to content

Shorten the ViewHistory class a little bit - #21678

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:ViewHistory-findIndex
Aug 2, 2026
Merged

Shorten the ViewHistory class a little bit#21678
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:ViewHistory-findIndex

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator
  • Replace the manual loop, used to find an existing entry, with the native findIndex method.

  • Remove the fingerprint/cacheSize class fields, since they are completely unused.

 - Replace the manual loop, used to find an existing entry, with the native [`findIndex` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).

 - Remove the `fingerprint`/`cacheSize` class fields, since they are completely unused.
@codecov-commenter

codecov-commenter commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.01%. Comparing base (7fc7072) to head (664526e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21678      +/-   ##
==========================================
+ Coverage   90.00%   90.01%   +0.01%     
==========================================
  Files         263      263              
  Lines       66854    66849       -5     
==========================================
+ Hits        60173    60176       +3     
+ Misses       6681     6673       -8     
Flag Coverage Δ
browsertest 66.54% <ø> (+<0.01%) ⬆️
integrationtest 69.36% <100.00%> (+<0.01%) ⬆️
unittest 57.83% <ø> (-0.01%) ⬇️
unittestcli 56.55% <ø> (-0.01%) ⬇️

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 2475c4e into mozilla:master Aug 2, 2026
16 of 17 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Thank you for simplifying this a bit!

@Snuffleupagus
Snuffleupagus deleted the ViewHistory-findIndex branch August 2, 2026 11:48
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