Closed Bug 1911054 Opened 1 year ago Closed 9 months ago

Make the inline preview selectors check for the selected source

Categories

(DevTools :: Debugger, enhancement)

enhancement

Tracking

(firefox133 fixed)

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(3 files)

Bug 1871500 review highlighted some discrepancies when using CodeMirror 6, where inlinepreviews for tracer are kept visible when opening any other document other than the one being traced.
https://phabricator.services.mozilla.com/D197118#7497696

We could strengthen the selectors around inline previews to include this logic of checking if the paused/traced location is matching the currently selected source. (That instead of having this logic being kept within mapStateToProps of the InlinePreviews React component)

This help stop passing the selected frame as argument and ensure we never try to fetch data for an outdated frame.
While doing this, I'm adding assertion after each async call to stop execution if we resumed or moved to another frame.

We were doing the check in the mapStateToProps, but only for pausing, not for tracing.
Let's do that consistantly from the selector.

This avoids having to pass the current thread from most callsites.
Even the leftovers, still passing a custom thread argument,
should probably be asserting that they are still relevant,
and be working against the currently selected thread.

Assignee: nobody → poirot.alex
Attachment #9417223 - Attachment description: Bug 1911054 - [devtools] Assume fetchScopes, generateInlinePreview and getInlinePreviews to always work against the currently selected frame → Bug 1911054 - [devtools] Assume fetchScopes, generateInlinePreview and getInlinePreviews to always work against the currently selected frame.
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/09f4923c2d48 [devtools] Assume fetchScopes, generateInlinePreview and getInlinePreviews to always work against the currently selected frame. r=devtools-reviewers,bomsy https://hg.mozilla.org/integration/autoland/rev/16f58009ebdc [devtools] Only consider inline previews if it matches the currently selected source. r=devtools-reviewers,bomsy https://hg.mozilla.org/integration/autoland/rev/a84faecace61 [devtools] Make getSelectedFrame selector return the frame for the current thread by default. r=devtools-reviewers,bomsy
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: