Bug 1533679 - Move session modules to a dedicated sessions folder. r=ato
authorAlexandre Poirot <poirot.alex@gmail.com>
Sun, 10 Mar 2019 12:50:59 +0000
changeset 521280 1dc639610f3b175d1cf3790469d1a4a571191199
parent 521279 886ef9f05fa352aee3742d82853e42891b1b5c52
child 521281 f46ddc90587ccdfaa730a3b85128ad25159b5bca
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)
reviewersato
bugs1533679
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 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
remote/ContentProcessSession.jsm
remote/Session.jsm
remote/frame-script.js
remote/jar.mn
remote/sessions/ContentProcessSession.jsm
remote/sessions/Session.jsm
remote/sessions/frame-script.js
remote/targets/Target.jsm
remote/test/unit/test_Session.js
--- a/remote/jar.mn
+++ b/remote/jar.mn
@@ -1,28 +1,28 @@
 # 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/.
 
 remote.jar:
 % content remote %content/
   content/Connection.jsm (Connection.jsm)
-  content/ContentProcessSession.jsm (ContentProcessSession.jsm)
   content/Error.jsm (Error.jsm)
   content/JSONHandler.jsm (JSONHandler.jsm)
   content/Log.jsm (Log.jsm)
   content/Observer.jsm (Observer.jsm)
   content/Protocol.jsm (Protocol.jsm)
   content/RecommendedPreferences.jsm (RecommendedPreferences.jsm)
-  content/Session.jsm (Session.jsm)
   content/Sync.jsm (Sync.jsm)
   content/WindowManager.jsm (WindowManager.jsm)
 
-  # Frame scripts
-  content/frame-script.js (frame-script.js)
+  # sessions
+  content/sessions/frame-script.js (sessions/frame-script.js)
+  content/sessions/ContentProcessSession.jsm (sessions/ContentProcessSession.jsm)
+  content/sessions/Session.jsm (sessions/Session.jsm)
 
   # targets
   content/targets/Target.jsm (targets/Target.jsm)
   content/targets/Targets.jsm (targets/Targets.jsm)
 
   # domains
   content/domains/Domain.jsm (domains/Domain.jsm)
   content/domains/Domains.jsm (domains/Domains.jsm)
rename from remote/ContentProcessSession.jsm
rename to remote/sessions/ContentProcessSession.jsm
rename from remote/Session.jsm
rename to remote/sessions/Session.jsm
--- a/remote/Session.jsm
+++ b/remote/sessions/Session.jsm
@@ -25,17 +25,17 @@ class Session {
 
     this.connection.onmessage = this.dispatch.bind(this);
 
     this.domains = new Domains(this, ParentProcessDomains);
     this.mm.addMessageListener("remote:event", this);
     this.mm.addMessageListener("remote:result", this);
     this.mm.addMessageListener("remote:error", this);
 
-    this.mm.loadFrameScript("chrome://remote/content/frame-script.js", false);
+    this.mm.loadFrameScript("chrome://remote/content/sessions/frame-script.js", false);
   }
 
   destructor() {
     this.domains.clear();
     this.connection.onmessage = null;
 
     this.mm.sendAsyncMessage("remote:destroy", {
       browsingContextId: this.browsingContext.id,
rename from remote/frame-script.js
rename to remote/sessions/frame-script.js
--- a/remote/frame-script.js
+++ b/remote/sessions/frame-script.js
@@ -1,10 +1,11 @@
 /* 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";
 
-const {ContentProcessSession} = ChromeUtils.import("chrome://remote/content/ContentProcessSession.jsm");
+const {ContentProcessSession} =
+  ChromeUtils.import("chrome://remote/content/sessions/ContentProcessSession.jsm");
 
 /* global content, docShell */
 new ContentProcessSession(this, docShell.browsingContext, content, docShell);
--- a/remote/targets/Target.jsm
+++ b/remote/targets/Target.jsm
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["Target"];
 
 const {Connection} = ChromeUtils.import("chrome://remote/content/Connection.jsm");
 const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {Session} = ChromeUtils.import("chrome://remote/content/Session.jsm");
+const {Session} = ChromeUtils.import("chrome://remote/content/sessions/Session.jsm");
 const {WebSocketDebuggerTransport} = ChromeUtils.import("chrome://remote/content/server/WebSocketTransport.jsm");
 const {WebSocketServer} = ChromeUtils.import("chrome://remote/content/server/WebSocket.jsm");
 const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "Favicons",
     "@mozilla.org/browser/favicon-service;1", "nsIFaviconService");
 
 /**
--- a/remote/test/unit/test_Session.js
+++ b/remote/test/unit/test_Session.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
-const {Session} = ChromeUtils.import("chrome://remote/content/Session.jsm");
+const {Session} = ChromeUtils.import("chrome://remote/content/sessions/Session.jsm");
 
 const connection = {onmessage: () => {}};
 
 class MockTarget {
   constructor() {
   }
 
   get browsingContext() {