Closed Bug 1936300 Opened 1 year ago Closed 1 year ago

Use distinct connection for watcher actors using a shared connection

Categories

(DevTools :: Framework, defect, P3)

defect

Tracking

(firefox135 fixed)

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently, debugging two contexts, like a tab, running in the same process from a remote debugging connection is deeply broken.
That's because we:

  • use a single DevToolsServerConnection on the server side
  • we end up spawning one watcher per context/tab
  • the two watchers are using the same DevToolsServerConnection and same forwardingPrefix
  • we end up with actors with the exact same actor ID, because they both use the same connection prefix
  • DevToolsProcess{Parent/Child} is also confused and the internal #connections map is used by two distinct watchers, which is source of even more troubles.

This issue only impacts remote debugging, as local debugging spawns one client and server connection per debugged context/tab.
This is also limited to tab debugging, where the tab runs in the same process.

The DevToolsProcess JS Process actor should better handle multiple instances
of watchers and will now have the to spawn their own DevToolsServerConnection,
with a new dedicated connection/forwarding prefix.

Severity: -- → S3
Priority: -- → P3
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ba8f27ea45d6 [devtools] Fix remote debugging two tabs running in the same process. r=devtools-reviewers,bomsy
Blocks: 1937879
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: