Closed Bug 1822307 Opened 1 year ago Closed 1 year ago

Clear highlightedLineRange in UI reducer on each target/thread removal

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox114 fixed)

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(3 files)

Similarly to bug 1814177, highlightedLineRange in the UI reducer should be clearer per target/thread removal in order to avoid breaking the source tree when pausing during unload event.

This data is transient so it isn't super critical to clear it,
but let's do it for consistancy between all the reducers.

While doing this:

  • clarify this attribute with jsdocs
  • use null as default value
  • avoid unecessary state change
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

It isn't super clear when item.location can be null,
but it looks overall simplier and clearer to use the two distinct actions from the React component.

Also note that the call to highlightLineRange was missing the sourceId attribute,
which will be important for the next changeset.

We were not reading highlightedLineRange's sourceId
and so we might have been highlighting the wrong lines.

Move some logic up to Editor/index which knows about the displayed source.
This also help completely disable the HighlightedLines component until
an highlights start.

Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dba44dab8dbf
[devtools] Clear highlightedLineRange on thread removal. r=devtools-reviewers,nchevobbe
https://hg.mozilla.org/integration/autoland/rev/7fa8b9418b7d
[devtools] Make QuickOpenModal more explicitly clear highlight ranges. r=devtools-reviewers,nchevobbe
https://hg.mozilla.org/integration/autoland/rev/169195adc869
[devtools] Ensure checking highlightedLineRange's related source. r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: