Pass profile upgrade info to stateFromLocation in compare view#5890
Pass profile upgrade info to stateFromLocation in compare view#5890mstange merged 4 commits intofirefox-devtools:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5890 +/- ##
==========================================
- Coverage 85.45% 85.42% -0.04%
==========================================
Files 321 321
Lines 32081 32168 +87
Branches 8842 8785 -57
==========================================
+ Hits 27416 27479 +63
- Misses 4233 4253 +20
- Partials 432 436 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mstange
left a comment
There was a problem hiding this comment.
Thanks! So you're calling stateFromLocation twice now. I think it would be better to make it clear that the first call is only aiming to get the "data source" information about the URL. If you look at the code which handles non-compare URLs, it's doing manual splitting of the URL to get those pieces of information. Can you move the data source determination code into a shared place and use it from both call sites, so that stateFromLocation is only called once we have the profile upgrade info?
4426394 to
865321e
Compare
865321e to
11b80cc
Compare
|
I was trying to check whether this patch actually fixes the issue I reported originally but I'm getting an error. The error may be caused by a separate (pre-existing) bug. Here's a pre-upgrade URL which has a "Focus on function" transform for If I go to https://profiler.firefox.com/compare/ and paste the above URL in both text boxes, click "Retrieve profiles", and then switch to one of the two identical "DOM Worker" threads, the "Focus on function" transform is wrong; it's focusing on However, if I go to https://deploy-preview-5890--perf-html.netlify.app/compare/ (the deploy preview for this PR) and follow the same steps, I get an error: |
|
Thanks for testing! I looked into this and I think it's a pre-existing bug, not caused by this PR. The profile at that hash was stored on deploy-preview-5739 (Dec 2025), which is already at processed profile version 60. So The I also added a bounds check in Should I file a separate issue for the pre-existing per-thread funcIndex bug? |
No it's not - the profile it's downloading from https://storage.googleapis.com/profile-store/bd32mzpdcrj7ms80657qq8h7t75erwadr1yszcg has |
|
After rebasing on top of #5906 I no longer see the error. Merging, thank you! |
This PR fixes #5871