Stop selecting pretty printed source twice when enabling pretty printing on a given source
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: ochameau, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
When we toggle ON pretty printing on a given source, we are currently selecting it twice.
A first time over there, which we await for:
https://searchfox.org/mozilla-central/rev/a352cc827575823676717d53766c39710b54201a/devtools/client/debugger/src/actions/sources/prettyPrint.js#78
And then, a second time, other there, which this time, we don't wait for!!
https://searchfox.org/mozilla-central/rev/a352cc827575823676717d53766c39710b54201a/devtools/client/debugger/src/actions/sources/prettyPrint.js#140
Ideally, we should only keep the second selection, which correctly select the pretty printed source. (While the first reselect the minified source)
Unfortunately, fixing this highlights many race condition and design flaws on pretty printed source management and might require a more substantial fix.
| Reporter | ||
Comment 1•3 years ago
|
||
- extend the coverage of pretty printed button (which relates to isJavascript method).
- fix selectSource test helper against WASM sources (they don't have symbols)
- fix a bug in createPrettySource which was selecting the pretty printed source twice
Its callsite, togglePrettyPrint is already selecting the source.
Updated•2 months ago
|
Description
•