Skip to content

Bug 1499551 - Fix accumulating window event-listener leaks (part 1/3) - #9704

Open
camd wants to merge 2 commits into
masterfrom
camd/bug-1499551-listener-leaks
Open

Bug 1499551 - Fix accumulating window event-listener leaks (part 1/3)#9704
camd wants to merge 2 commits into
masterfrom
camd/bug-1499551-listener-leaks

Conversation

@camd

@camd camd commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Part 1 of 3 addressing Bug 1499551 (jobs-view memory/CPU growth over time).

Two class components added a window event listener with an anonymous handler and no componentWillUnmount, so each mount permanently accumulated a listener (and its captured component instance):

  • FailureSummaryTab (internalIssueClassification) — remounts on every job selection.
  • GraphsContainer (resize) — remounts on every test/time-range change.

Both now store the handler as a stable class-property arrow and remove that same reference on unmount. GraphsContainer's resize handler recomputes zoomDomain from current scatterPlotData (via the existing initZoomDomain) instead of capturing a stale mount-time value.

Independent of the other two Bug 1499551 PRs.

Testing

  • New unit tests assert the same handler reference is removed on unmount.
  • Full frontend unit suite passes; lint clean.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.67%. Comparing base (6a820e6) to head (f43671f).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
ui/perfherder/graphs/GraphsContainer.jsx 80.00% 1 Missing ⚠️
...i/shared/tabs/failureSummary/FailureSummaryTab.jsx 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #9704    +/-   ##
========================================
  Coverage   82.66%   82.67%            
========================================
  Files         626      626            
  Lines       36753    36757     +4     
  Branches     3348     3276    -72     
========================================
+ Hits        30383    30389     +6     
- Misses       5988     6218   +230     
+ Partials      382      150   -232     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants