Closed Bug 1712686 Opened 3 years ago Closed 3 years ago

Pull DevToolsClient from `commands` instead of target fronts

Categories

(DevTools :: Framework, task)

task

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Various code currently fetch the DevToolsClient via the target fronts, but it is imperfect for two reasons:

  • because of target switching, the target may be destroyed and replaced by another one. While the target is short lived, the client will still be available. So we should host the client on something that is having the same or longer lifetime as itself. commands is having a similar lifetime to its inner DevtoolsClient.
  • it forces us to fetch and use a target front, whereas you may want to use a client without having any target offhand. commands is again is good host as it is the first available object to spawn before doing any RDP interaction.

Also, some usages of DevToolsClient (typically waitForRequestToSettle) should ideally be refactored to stop using DevToolsClient directly and instead go through a TestCommand (bug 1701602).
So that frontend codebase never use RDP directly and only use commands.

Blocks: 1712739
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb760390b045
[devtools] Pull DevToolsClient from commands object instead of target fronts. r=nchevobbe
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: