Closed Bug 1642371 Opened 4 years ago Closed 4 years ago

The SourceMapURLService should use actor ID as often as possible

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox79 fixed)

RESOLVED FIXED
Firefox 79
Tracking Status
firefox79 --- fixed

People

(Reporter: loganfsmyth, Assigned: loganfsmyth)

References

(Blocks 1 open bug)

Details

Attachments

(8 files)

The source map url service allows parts of the codebase to subscribe to get notifications when the filename/line/column of a particular location changes. This happens when a sourcemap loads and causes the location to change from an original to generated location. It also happens if the pref is toggled off because then all of the sourcemap-based locations need to be cleared.

Unfortunately, right now many places that subscribe to these notifications do so using the url of the generated source file instead of the actor ID, which means that if the same file gets loaded multiple times, or an original source file shares the same URL as the generated source file, the debugger cannot know which file it is being asked to open.

Making this work fully for JavaScript files is going to be blocked on https://bugzilla.mozilla.org/show_bug.cgi?id=1641121, but for now, we can at least get the URL service updated to support IDs, and get the CSS viewer/editor panes updated to use IDs, since they all work directly work stylesheet actors and are guaranteed to know the actor IDs, so that's what this issue will focus primarily on as an end goal, though I'll get as much of this done for JS files as I can.

Attachment #9153292 - Attachment description: Bug 1642371 - Part 4: Open style editor using exact front object where possible. j=jlast! → Bug 1642371 - Part 4: Open style editor using exact front object where possible. r=jlast!
Blocks: 1643180
Pushed by loganfsmyth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a3e4d6f3ed54
Part 1: Remove unnecessary duplicated source mapping. r=jlast
https://hg.mozilla.org/integration/autoland/rev/0b2da4c0f24e
Part 2: Consistently differentiate sourceMapService and sourceMapURLService. r=jlast
https://hg.mozilla.org/integration/autoland/rev/dc664b97bfa8
Part 3: Remove the sourceMapURLService dependency from function reps. r=jlast
https://hg.mozilla.org/integration/autoland/rev/75d20dce12de
Part 4: Open style editor using exact front object where possible. r=jlast
https://hg.mozilla.org/integration/autoland/rev/35154fa9ea39
Part 5: Make .unsubscribe private in the source-map-url-service. r=jlast
https://hg.mozilla.org/integration/autoland/rev/06d0c56d7a02
Part 6: Expose the original position as an object for simpler arg processing. r=jlast
https://hg.mozilla.org/integration/autoland/rev/0d02eb26dbca
Part 7: Reimplement SourceMapURLService to allow subscribing/querying by URL _and_ ID. r=jlast
https://hg.mozilla.org/integration/autoland/rev/802ae8321efb
Part 8: Use actor IDs instead of URLs when resolving CSS sourcemaps. r=jlast
No longer blocks: 1642034
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: