Remove support of `to` overloading by fronts.
Categories
(DevTools :: Framework, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: ochameau, Unassigned)
References
(Blocks 1 open bug)
Details
Reporter | ||
Comment 1•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•5 years ago
|
||
The goal here would be to rebase this patch:
https://hg.mozilla.org/try/rev/67c199b92560bfd910ff5673de886963b0d362bb
Push to try again and test extensively the tools to ensure there is no hidden breakage.
A little bit more context about the to
attribute.
It is being used in low level JSON packets being sent between the client and the server in order to identify to which actor we send a particular packet. This typically allows to call a given method of a given actor:
{ to: "actorID", type: "attach" }
This packet will execute attach
method of an actor whose ID is actorID
.
These to
and type
attributes are being managed by protocol.js, but it looks like we allow the fronts to override to
by allowing to
in specifications and then here, in this send request, explicitely accept to
overloading. To do that, the specification of a method should mention a to
attribute and you should pass an actorID to the front method which is specific with a to
attribute.
The final code involved into this is the following:
The most high level one, which implements the protocol.js front methods:
https://searchfox.org/mozilla-central/source/devtools/shared/protocol/Front/FrontClassWithSpec.js#36-49
Front.request():
https://searchfox.org/mozilla-central/source/devtools/shared/protocol/Front.js#143-153
And Front.send():
https://searchfox.org/mozilla-central/source/devtools/shared/protocol/Front.js#160-168
Updated•2 years ago
|
Description
•