Translate URL track-index state through profile sanitization#6000
Open
fatadel wants to merge 1 commit intofirefox-devtools:mainfrom
Open
Translate URL track-index state through profile sanitization#6000fatadel wants to merge 1 commit intofirefox-devtools:mainfrom
fatadel wants to merge 1 commit intofirefox-devtools:mainfrom
Conversation
Previously, hidden non-thread tracks (screenshots, network, IPC) reappeared after publishing a sanitized profile when sanitization also removed a thread: the URL state's hidden-track sets and track-order were reset whenever threads were re-indexed, even though the non-thread tracks still existed in the sanitized profile. attemptToPublish now builds an old to new TrackIndex map by matching tracks on stable identity (pid, screenshot id, threadIndex, counterIndex, visual-progress singleton) and translates hiddenGlobalTracks, globalTrackOrder, hiddenLocalTracksByPid, and localTrackOrderByPid through it on SANITIZED_PROFILE_PUBLISHED. Marker tracks key on a string-table index that sanitization reshuffles, so they are not matched. Fixes firefox-devtools#2947
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6000 +/- ##
==========================================
+ Coverage 83.81% 83.82% +0.01%
==========================================
Files 328 328
Lines 34253 34370 +117
Branches 9569 9512 -57
==========================================
+ Hits 28710 28812 +102
- Misses 5115 5130 +15
Partials 428 428 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, hidden non-thread tracks (screenshots, network, IPC) reappeared after publishing a sanitized profile when sanitization also removed a thread: the URL state's hidden-track sets and track-order were reset whenever threads were re-indexed, even though the non-thread tracks still existed in the sanitized profile.
attemptToPublish now builds an old to new TrackIndex map by matching tracks on stable identity (pid, screenshot id, threadIndex, counterIndex, visual-progress singleton) and translates hiddenGlobalTracks, globalTrackOrder, hiddenLocalTracksByPid, and localTrackOrderByPid through it on SANITIZED_PROFILE_PUBLISHED. Marker tracks key on a string-table index that sanitization reshuffles, so they are not matched.
Fixes #2947.
The work is built upon the draft PR by @julienw.
STR are available in the original issues, here is the deploy preview profile.