Transform *Connector objects in devtools/server/connectors into functions
Categories
(DevTools :: Framework, task, P3)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: jdescottes)
References
Details
Attachments
(2 files)
In Bug 1572671, we are going to remove the _contentProcessServerStartupScriptLoaded
property on the ContentProcessConnector
object.
This will mean that the object will only contains a single, startServer
property.
This is already the case for the other connectors object in this folder.
I wonder if there would be any blocker to turn those connector objects into functions (i.e. what's in startServer
at the moment), since we don't have much advantages having an object for that.
But maybe there's something I'm missing? Let's talk about it
Assignee | ||
Comment 1•5 years ago
|
||
I think it's fine to turn them into functions.
Assignee | ||
Comment 2•5 years ago
|
||
Another related followup is that the DebuggerServer's only forwarding to connectors right now:
https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/devtools/server/debugger-server.js
/**
* See ContentProcessConnector.startServer.
*/
connectToContentProcess(connection, mm, onDestroy) {
return ContentProcessConnector.startServer(connection, mm, onDestroy);
},
/**
* See WorkerConnector.startServer.
*/
connectToWorker(connection, dbg, id, options) {
return WorkerConnector.startServer(connection, dbg, id, options);
},
/**
* See FrameConnector.startServer.
*/
connectToFrame(connection, frame, onDestroy, { addonId } = {}) {
return FrameConnector.startServer(connection, frame, onDestroy, {
addonId,
});
},
We could check if it's not easier to directly call the connectors instead of going through DebuggerServer.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D43618
Assignee | ||
Comment 4•5 years ago
|
||
Depends on D43728
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e30f91bfaec9 Change devtools server connectors to expose connectTo functions r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/848ac630ed23 Remove connectTo* helpers in debugger-server and use connectors directly r=nchevobbe
Updated•5 years ago
|
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e30f91bfaec9
https://hg.mozilla.org/mozilla-central/rev/848ac630ed23
Description
•