Граф коммитов

27 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky 9d613f2dd4 Bug 1568581. Stop mixing XULWindow and Window instances in TabObserver.jsm. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D39220

--HG--
extra : moz-landing-system : lando
2019-07-24 16:43:26 +00:00
Alexandre Poirot f0a9475719 Bug 1563690 - Make Target class save a list of Connection rather than Session. r=remote-protocol-reviewers,jdescottes
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
2019-07-18 16:39:11 +00:00
Alexandre Poirot 6deb23fefc Bug 1563689 - Release DOM event listeners set on top level windows. r=remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D38205

--HG--
extra : moz-landing-system : lando
2019-07-18 09:48:18 +00:00
Alexandre Poirot 3342beba03 Bug 1563689 - Ensure removing listeners set by TabObserver. r=remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D38201

--HG--
extra : moz-landing-system : lando
2019-07-16 16:30:10 +00:00
Alexandre Poirot 111854b5a5 Bug 1563689 - Revamp how targets are watched and reported. r=remote-protocol-reviewers,ato,jdescottes
* TabObserver is rather an helper class of Targets rather than RemoteAgent.
  Targets is the class which holds all the targets and reports about their
  creation and destructor. It feels legitimate to have it directly integrate
  with TabObserver.
* To better sort of the files. i.e. avoid having "random files" in /remote/
  I'm renaming and moving TabObserver according to its usage.
* We were emitting "connect" and "disconnect" event when a target was created
  or destroyed. But this is misleading as there is no connection to anything
  being made. Only later, a CDP client might connect to a target HTTP endpoint
  and initiate a connection. These events are making this hard to understand
  that the connection actually happens when Target.handle is called.

Differential Revision: https://phabricator.services.mozilla.com/D37043

--HG--
rename : remote/WindowManager.jsm => remote/targets/TabObserver.jsm
extra : moz-landing-system : lando
2019-07-18 12:30:10 +00:00
Alexandre Poirot 370bc3f1f2 Bug 1563692 - Move all CDP's JSON packet handling to Connection. r=remote-protocol-reviewers,jdescottes,ato
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
2019-07-11 17:45:29 +00:00
Alexandre Poirot 2cb94420be Bug 1563687 - Rename Targets.disconnect to destructor to better match project's conventions. r=remote-protocol-reviewers,jdescottes,ato
Connect and disconnect in misleading here as a target aren't connected/disconnected,
but instead, being unregistered and destroyed. The fact that they are "disconnected"
is a side effect of this destruction. Also note that a Target is never "connected",
it is only a Connection and its related sessions which really are connected to a remote client.

Differential Revision: https://phabricator.services.mozilla.com/D37042

--HG--
extra : moz-landing-system : lando
2019-07-10 16:32:35 +00:00
Alexandre Poirot 9c99764b14 Bug 1563685 - Rename WebSocketDebuggerTransport class to match its JSM file name. r=remote-protocol-reviewers,jdescottes,ato
Differential Revision: https://phabricator.services.mozilla.com/D37040

--HG--
extra : moz-landing-system : lando
2019-07-09 09:36:16 +00:00
Alexandre Poirot 6713234855 Bug 1563685 - Rename WebSocket.jsm and drop unused accept method. r=remote-protocol-reviewers,jdescottes,ato
Differential Revision: https://phabricator.services.mozilla.com/D37039

--HG--
rename : remote/server/WebSocket.jsm => remote/server/WebSocketHandshake.jsm
extra : moz-landing-system : lando
2019-07-09 09:36:14 +00:00
shindli 351e9a95ce Backed out 2 changesets (bug 1563685) for causing bc perma failures in browser/base/content/test/static/browser_all_files_referenced.js CLOSED TREE
Backed out changeset 10109cbe9641 (bug 1563685)
Backed out changeset 6525d810b0b0 (bug 1563685)

--HG--
rename : remote/server/WebSocketHandshake.jsm => remote/server/WebSocket.jsm
2019-07-08 22:25:34 +03:00
Alexandre Poirot a07eadfa52 Bug 1563685 - Rename WebSocketDebuggerTransport class to match its JSM file name. r=remote-protocol-reviewers,jdescottes,ato
Differential Revision: https://phabricator.services.mozilla.com/D37040

--HG--
extra : moz-landing-system : lando
2019-07-08 15:03:12 +00:00
Alexandre Poirot 22a355f138 Bug 1563685 - Rename WebSocket.jsm and drop unused accept method. r=remote-protocol-reviewers,jdescottes,ato
Differential Revision: https://phabricator.services.mozilla.com/D37039

--HG--
rename : remote/server/WebSocket.jsm => remote/server/WebSocketHandshake.jsm
extra : moz-landing-system : lando
2019-07-08 15:03:10 +00:00
Victor Porof 991b3c93c6 Bug 1561435 - Format remote/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35925

--HG--
extra : source : b793788d0f38244b33eb59ea36e2c6624dbd12c5
2019-07-05 10:56:48 +02:00
Alexandre Poirot 6e45d0129a Bug 1560301 - Implement very minimal support of browser context. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D35427

--HG--
extra : moz-landing-system : lando
2019-07-02 12:40:58 +00:00
Alexandre Poirot c4a5d97834 Bug 1560281 - Emit Target.targetCreated for the main process target. r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D35420

--HG--
extra : moz-landing-system : lando
2019-06-20 13:51:53 +00:00
Alexandre Poirot 8c54f21269 Bug 1560281 - Set main process target's "type" attribute to "browser". r=remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D35419

--HG--
extra : moz-landing-system : lando
2019-06-20 14:14:20 +00:00
Alexandre Poirot d61e8d213e Bug 1543071 - Implement Target.closeTarget r=ato
Depends on D35106

Differential Revision: https://phabricator.services.mozilla.com/D35107

--HG--
extra : moz-landing-system : lando
2019-06-19 12:23:16 +00:00
Alexandre Poirot 5cae2c807d Bug 1539221 - Register main process target on server start. r=ato
Depends on D25556

Differential Revision: https://phabricator.services.mozilla.com/D25557

--HG--
rename : remote/test/browser/browser_target.js => remote/test/browser/browser_main_target.js
extra : moz-landing-system : lando
2019-04-04 11:16:27 +00:00
Alexandre Poirot 26d0c79caa Bug 1536888 - Move the remote agent to a JSM. r=ato
This will later help register the component statically in bug 1536862.
And already ease using the remote agent from other JSM files.

Differential Revision: https://phabricator.services.mozilla.com/D24227

--HG--
rename : remote/RemoteAgent.js => remote/RemoteAgent.jsm
extra : moz-landing-system : lando
2019-03-22 09:46:50 +00:00
Alexandre Poirot 7d04b7c5e0 Bug 1536794 - Moving Target's path definition to a unique place, on Target class. r=ato
Doing this helps fixing the main target's path which is meant to be:
  /devtools/browser

Depends on D24220

Differential Revision: https://phabricator.services.mozilla.com/D24221

--HG--
extra : moz-landing-system : lando
2019-03-21 14:17:30 +00:00
Alexandre Poirot 4c3f075b45 Bug 1536794 - Close httpd's Connection when closing the remote agent's server. r=ato
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
2019-03-21 14:17:36 +00:00
Alexandre Poirot 8f9717d1e8 Bug 1536794 - Implement a base Target class. r=ato
In this revision it only helps sharing `handle`.
But in a followup changeset, it will also help closing all the connections
and justify the `sessions` map we keep around.

Differential Revision: https://phabricator.services.mozilla.com/D24219

--HG--
rename : remote/targets/MainProcessTarget.jsm => remote/targets/Target.jsm
extra : moz-landing-system : lando
2019-03-21 14:17:21 +00:00
Alexandre Poirot 2bdbc39239 Bug 1533682 - Implements more Target/Page methods/events to support puppeteer's browser.newPage. r=ato
Depends on D22694

Differential Revision: https://phabricator.services.mozilla.com/D22695

--HG--
extra : moz-landing-system : lando
2019-03-11 12:50:26 +00:00
Alexandre Poirot 416760c48b Bug 1533679 - Differentiate Sessions and Targets bound to a browser-element from the others. r=ato
The Session used by MainProcessTarget isn't bound to any browser-element
and so do not use any of the message manager to pipe message to the content process.
Same for Target, the MainProcessTarget doesn't expose any browsing-context-related attribute.

Depends on D22691

Differential Revision: https://phabricator.services.mozilla.com/D22692

--HG--
rename : remote/sessions/Session.jsm => remote/sessions/TabSession.jsm
rename : remote/targets/Target.jsm => remote/targets/TabTarget.jsm
extra : moz-landing-system : lando
2019-03-10 12:51:09 +00:00
Alexandre Poirot cf6ef6bab7 Bug 1533679 - Implement /json/version. r=ato
Introduces a new kind of target "main-process",
which is not bound to any particular browser-element/browsing-context.
This implements only a subtest of domains and typical won't support the "content" ones.

This will require some more work in order to acknowledge having multiple kinds of targets.
We will also have "worker", "addon" and remoted-frames which will be very similar to tabs.

Depends on D22690

Differential Revision: https://phabricator.services.mozilla.com/D22691

--HG--
extra : moz-landing-system : lando
2019-03-10 12:51:49 +00:00
Alexandre Poirot 2d957cfacd Bug 1533679 - Move session modules to a dedicated sessions folder. r=ato
This is going to help have different kind of session par target kind.

Depends on D22686

Differential Revision: https://phabricator.services.mozilla.com/D22687

--HG--
rename : remote/ContentProcessSession.jsm => remote/sessions/ContentProcessSession.jsm
rename : remote/Session.jsm => remote/sessions/Session.jsm
rename : remote/frame-script.js => remote/sessions/frame-script.js
extra : moz-landing-system : lando
2019-03-10 12:50:59 +00:00
Alexandre Poirot b87adfb2ba Bug 1533679 - Move targets modules to a dedicated targets folder. r=ato
This is going to help introduce multiple kind of targets.

Depends on D22685

Differential Revision: https://phabricator.services.mozilla.com/D22686

--HG--
rename : remote/Target.jsm => remote/targets/Target.jsm
rename : remote/Targets.jsm => remote/targets/Targets.jsm
extra : moz-landing-system : lando
2019-03-10 12:50:57 +00:00