Connection already saves the list of Session, so it is more natural
to save it only once there and instead directly close the connections
from Target. Each connection is going to cleanup all related sessions.
I also stop automatically registering the session to the connection from Session constructor,
it felt not explicit enough.
Differential Revision: https://phabricator.services.mozilla.com/D37045
--HG--
extra : moz-landing-system : lando
This helps sharing a single implementation of how the JSON objects
are read and written from/to the WebSocket connection.
Also, by delegating the command calls to the Session via `Session.execute`
and expecting a promise with a resolution or rejection, we make error
handling of command calls clearer and unified.
Differential Revision: https://phabricator.services.mozilla.com/D37046
--HG--
extra : moz-landing-system : lando
This fixes the browser mochitest which currently timesout when calling server.close()
It started to timeout when the patch related to websocket handshake landed.
Depends on D24219
Differential Revision: https://phabricator.services.mozilla.com/D24220
--HG--
extra : moz-landing-system : lando
In order to be able to query/instantiate sub targets like remote frames, or tab targets from the MainProcessTarget,
we have to support session at the protocol layer.
This is all based on a `sessionId` attribute put on all inbound/outbound messages.
This patch will be later used, once we start instantiating sub targets.
Differential Revision: https://phabricator.services.mozilla.com/D22694
--HG--
extra : moz-landing-system : lando
This was breaking the constructor name, used in Domain.jsm.
As doing
this.Foo = class extends Domain {
creates a class with undefined constructor name.
While
class Foo extends Domain {
creates a class with "Foo" as domain name.