bug 1523104: remote: document Session class; r=ochameau
authorAndreas Tolfsen <ato@sny.no>
Thu, 07 Mar 2019 22:11:11 +0000
changeset 521130 932d90008fe2
parent 521129 0fa4b12c2f35
child 521131 4696a88c5274
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1523104
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1523104: remote: document Session class; r=ochameau
remote/Session.jsm
--- a/remote/Session.jsm
+++ b/remote/Session.jsm
@@ -5,16 +5,24 @@
 "use strict";
 
 var EXPORTED_SYMBOLS = ["Session"];
 
 const {ParentProcessDomains} = ChromeUtils.import("chrome://remote/content/domains/ParentProcessDomains.jsm");
 const {Domains} = ChromeUtils.import("chrome://remote/content/domains/Domains.jsm");
 const {formatError} = ChromeUtils.import("chrome://remote/content/Error.jsm");
 
+/**
+ * A session represents exactly one client WebSocket connection.
+ *
+ * Every new WebSocket connections is associated with one session that
+ * deals with despatching incoming command requests to the right
+ * target, sending back responses, and propagating events originating
+ * from domains.
+ */
 class Session {
   constructor(connection, target) {
     this.connection = connection;
     this.target = target;
 
     this.connection.onmessage = this.dispatch.bind(this);
 
     this.domains = new Domains(this, ParentProcessDomains);