mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
370bc3f1f2
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
19 lines
578 B
JavaScript
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 {}
|