Target should be used to fetch any other target scoped front
Categories
(DevTools :: Debugger, enhancement, P1)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
(Whiteboard: dt-fission-m1)
Attachments
(1 file)
For now, a Map of thread actor ID is being maintainted over here:
newWorkerClients[workerThread.actor] = {
url: workerTargetFront.url,
thread: workerThread,
console: consoleFront,
};
This clearly replicates the Target fronts and its TargetMixin class. Targets expose url
and the getFront
method to access any other target scoped front like console, thread, but also the inspector and all other similar fronts.
The current doesn't scale, especially when this pattern escape from the debugger into the console.
By using the thread actor ID as a key in the console:
https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/devtools/client/webconsole/webconsole-wrapper.js#171-184
const state = this.hud.getDebuggerFrames();
const grip = state.frames[state.selected];
return {
frameActor: grip.actor,
client: this.hud.lookupConsoleClient(grip.thread),
};
It forces us to have to call some function of the debugger, lookupConsoleClient
in order to derivate the console front out of the thread actor ID.
Instead, if the debugger would have passed the target front out of DebuggerPanel.getFrames
, we would have more naturally retrieved the console front via target.getFront("console")
.
The same actually applies to the internals of the debugger. The whole newWorkerClients
map could actually be a map of targets.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Comment 3•6 years ago
|
||
Backed out changeset ec73bc656bd3 (bug 1569690) for causing debugger failures CLOSED TREE
Bckout revision https://hg.mozilla.org/integration/autoland/rev/54ee2e91f816377df047882e28c19a76ba422b0d
Failure log https://treeherder.mozilla.org/logviewer.html#?job_id=259542880&repo=autoland
Alexandre can you please take a look?
Comment 5•6 years ago
|
||
bugherder |
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•5 years ago
|
Updated•3 years ago
|
Description
•