Skip to content

Fix null marker stack substitution#5613

Merged
mstange merged 2 commits intofirefox-devtools:mainfrom
mstange:fix-null-marker-stack-substitution
Sep 14, 2025
Merged

Fix null marker stack substitution#5613
mstange merged 2 commits intofirefox-devtools:mainfrom
mstange:fix-null-marker-stack-substitution

Conversation

@mstange
Copy link
Contributor

@mstange mstange commented Sep 11, 2025

Example with Focus function transform: Production | Deploy preview
Example with JS-only view: Production | Deploy preview

Fixes #5612.

The more stringent array bounds checks from #5599 revealed a bug that I introduced in #5549: Marker stacks were not being substituted if the convertStack lambda returned null. This PR fixes the type and restores the working code from before the TypeScript migration.

@mstange mstange requested a review from canova September 11, 2025 20:13
@mstange mstange self-assigned this Sep 11, 2025
We want stack-less "causes" whenever we want to filter out a
stack completely, for example because it doesn't contain the
focused function when we're applying a focus function transform.

Pre-TypeScript, we were already using this field that way, even
though it wasn't typed correctly.
We need to replace cause.stack even if convertStack returned null,
otherwise we have bad stack indexes sticking around.

The incorrect `if (stack)` was added during the TypeScript migration
in commit ed02f3f.

This restores the logic as it was before the migration.
@mstange mstange force-pushed the fix-null-marker-stack-substitution branch from 548b7b7 to 124cf1d Compare September 11, 2025 20:17
@codecov
Copy link

codecov bot commented Sep 11, 2025

Codecov Report

❌ Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.82%. Comparing base (4c96d7d) to head (124cf1d).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/components/tooltip/Marker.tsx 92.85% 1 Missing ⚠️
src/profile-logic/profile-data.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5613   +/-   ##
=======================================
  Coverage   85.82%   85.82%           
=======================================
  Files         309      309           
  Lines       30426    30424    -2     
  Branches     8371     8371           
=======================================
- Hits        26112    26111    -1     
+ Misses       3893     3892    -1     
  Partials      421      421           

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Member

@canova canova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@mstange mstange merged commit 41631b5 into firefox-devtools:main Sep 14, 2025
15 checks passed
canova added a commit that referenced this pull request Sep 16, 2025
Changes:

[Markus Stange] Switch CSS back to using relative paths inside url(...)
(#5594)
[Markus Stange] Use dynamic imports for jszip (#5593)
[Florian Quèze] Allow markers to provide a marker color. (#5607)
[Ryan Hunt] Update iongraph-web to latest version (#5606)
[Florian Quèze] Fix the color contrast of hovered colored markers.
(#5609)
[Florian Quèze] Scale custom marker graphs on values within the
committed range. (#5587)
[Markus Stange] Fix null marker stack substitution (#5613)
[Florian Quèze] Track context menus should be accessible from anywhere
in the track (#5562)
[Markus Stange] Worker + compression cleanups (#5602)
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.

Search filtering is still broken sometimes, when another filter is active

2 participants