Closed Bug 1642371 Opened 4 years ago Closed 4 years ago

The SourceMapURLService should use actor ID as often as possible


(DevTools :: Debugger, defect)



(firefox79 fixed)

Firefox 79
Tracking Status
firefox79 --- fixed


(Reporter: loganfsmyth, Assigned: loganfsmyth)


(Blocks 1 open bug)



(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, 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
Part 1: Remove unnecessary duplicated source mapping. r=jlast
Part 2: Consistently differentiate sourceMapService and sourceMapURLService. r=jlast
Part 3: Remove the sourceMapURLService dependency from function reps. r=jlast
Part 4: Open style editor using exact front object where possible. r=jlast
Part 5: Make .unsubscribe private in the source-map-url-service. r=jlast
Part 6: Expose the original position as an object for simpler arg processing. r=jlast
Part 7: Reimplement SourceMapURLService to allow subscribing/querying by URL _and_ ID. r=jlast
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.