Closed Bug 1759436 Opened 2 years ago Closed 2 years ago

Cleanup the plainUrl object in the sources reducer

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bomsy, Unassigned)

References

(Blocks 3 open bugs)

Details

(Whiteboard: dt-fission-future, dt-perf-stability-mvp)

Following up from 1728587
This is only used by this selector:
https://searchfox.org/mozilla-central/search?q=getHasSiblingOfSameName&redirect=false

Which only used this other selector:
https://searchfox.org/mozilla-central/source/devtools/client/debugger/src/selectors/sources.js#156-163

Given that we don't care about the values of plainUrls, you might revisit this attribute to store source IDs. It would ease its management. But probably break the few jest test using that selector directly...

various suggestions:

  • revising plainUrls to store IDs like other data structures here.
  • revisit the jest test to test getHasSiblingOfSameName instead of getSourcesUrlsInSources (bonus point if you make a mochitest instead ;))
  • get rid of getSourcesUrlsInSources and only expose/implement getHasSiblingOfSameName selector (you might also inline getPlainUrls into it) (bonus point if you document this selector :))

Bug 1774601 will remove this code.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.