Closed Bug 1690269 Opened 5 years ago Closed 5 years ago

Make the source ID in debugger frontend unique per URL and per target

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox87 fixed)

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(3 files, 1 obsolete file)

makeSourceId is written as if only service worker were the only one distinct thread/target debugged by the debugger frontend:
https://searchfox.org/mozilla-central/rev/4e290edc65023e16f5fe7d12f84d3b629433c7ab/devtools/client/debugger/src/client/firefox/create.js#80-89

This may cause troubles in the browser toolbox, if the same URL appear in both parent and content process. I have no idea how much troubles it can cause.
It would probably show the URL only once instead of once per target.
But I don't know if that can also mess up with breakpoints??

See Also: → 1602440

This code was designed for when the debugger was only supporting service workers as additional target.
Now that we can have many: regular workers, content process, addons...
We should ensure that each target type gets its own source set.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

I think we were only trying to assert the URL of the selected source. That's what I'm doing here.
Using findSource, which picks the first matching source by URL breaks
the support of the debugger with many targets.
With many targets, the debugger will start spawning one source per URL, per target.
Leading to many sources with the same URL.

Attachment #9201139 - Attachment is obsolete: true
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e0dd5c6ff61c [devtools] Set a unique source ID per URL and per target type for frontend source objects. r=nchevobbe,bomsy https://hg.mozilla.org/integration/autoland/rev/1785e6308186 [devtools] Fix waitForSelectedSource for debugger connect to many targets. r=nchevobbe,jdescottes https://hg.mozilla.org/integration/autoland/rev/eba8fe38d149 [devtools] Stops maintaining a maps of source actorID to debugger frontend source id in commands. r=bomsy,nchevobbe
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: