Skip to content

Fix getUsefulTabs to handle cases where the first sample in a thread …#4484

Merged
julienw merged 3 commits into
firefox-devtools:mainfrom
julienw:fix-useful-tabs-when-frames-are-null
Feb 22, 2023
Merged

Fix getUsefulTabs to handle cases where the first sample in a thread …#4484
julienw merged 3 commits into
firefox-devtools:mainfrom
julienw:fix-useful-tabs-when-frames-are-null

Conversation

@julienw

@julienw julienw commented Feb 20, 2023

Copy link
Copy Markdown
Contributor

…is null

@padenot shared this profile with me: https://profiler.firefox.com/public/4ne691385vj2vxs3gzrsvvpbnkcne7tm74qgpxr/marker-chart/?globalTrackOrder=0w2&thread=2&v=8

It's not possible to select the parent process track.

The issue is that the first sample is null, and so this fails in

const stackIndex = ensureExists(samples.stack[0]);

I'm not sure how a sample can be null when coming from Gecko, possibly because of sanitization?
I know samply can do this too. As a result this fixes #4364 too.

Production / Deploy preview (click on the parent process)
Production / Deploy preview (click on WebCOOP track)

@julienw julienw requested a review from canova February 20, 2023 13:09
@codecov

codecov Bot commented Feb 20, 2023

Copy link
Copy Markdown

Codecov Report

Base: 88.64% // Head: 88.64% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (ddd6fe8) compared to base (4e5442e).
Patch coverage: 83.33% of modified lines in pull request are covered.

❗ Current head ddd6fe8 differs from pull request most recent head d704a9f. Consider uploading reports for the commit d704a9f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4484      +/-   ##
==========================================
- Coverage   88.64%   88.64%   -0.01%     
==========================================
  Files         284      284              
  Lines       25587    25591       +4     
  Branches     6882     6885       +3     
==========================================
+ Hits        22681    22684       +3     
- Misses       2701     2702       +1     
  Partials      205      205              
Impacted Files Coverage Δ
src/selectors/per-thread/composed.js 96.87% <83.33%> (-3.13%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mstange mstange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

@julienw

julienw commented Feb 22, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

@julienw julienw enabled auto-merge (squash) February 22, 2023 11:09
@julienw julienw merged commit 7f60386 into firefox-devtools:main Feb 22, 2023
@canova canova mentioned this pull request Feb 27, 2023
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.

Cannot switch to certain threads in this profile

2 participants