Open Bug 1510932 Opened 6 years ago Updated 2 years ago

Remove support of `to` overloading by fronts.

Categories

(DevTools :: Framework, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

Depends on: 1507125
A try run to see if any test fail if we throw when `to` is overloaded: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b28e358970c0ba0321b6fd824b9384bcc60897e9
Severity: normal → enhancement
Priority: -- → P3
Try reports no failure, so it looks like it can be removed.

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

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.