gecko-dev/remote/sessions/MainProcessSession.jsm
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

19 lines
578 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["MainProcessSession"];
const { Session } = ChromeUtils.import(
"chrome://remote/content/sessions/Session.jsm"
);
/**
* A session, dedicated to the main process target.
* For some reason, it doesn't need any specific code and can share the base Session class
* aside TabSession.
*/
class MainProcessSession extends Session {}