bug 1523104: remote: remove unused WindowManager.isWindowIncluded; r=ochameau
authorAndreas Tolfsen <ato@sny.no>
Thu, 07 Mar 2019 23:43:06 +0000
changeset 521139 de44fc903478
parent 521138 9e035690f943
child 521140 ed31c156cec0
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: remove unused WindowManager.isWindowIncluded; r=ochameau
remote/WindowManager.jsm
--- a/remote/WindowManager.jsm
+++ b/remote/WindowManager.jsm
@@ -2,17 +2,16 @@
  * 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 = [
   "TabObserver",
   "WindowObserver",
-  "WindowManager",
 ];
 
 const {DOMContentLoadedPromise} = ChromeUtils.import("chrome://remote/content/Sync.jsm");
 const {EventEmitter} = ChromeUtils.import("resource://gre/modules/EventEmitter.jsm");
 const {Log} = ChromeUtils.import("chrome://remote/content/Log.jsm");
 const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
@@ -142,33 +141,8 @@ class TabObserver {
     window.addEventListener("TabOpen", ({target}) => this.onTabOpen(target));
     window.addEventListener("TabClose", ({target}) => this.onTabClose(target));
   }
 
   onWindowClose(window) {
     // TODO(ato): Is TabClose fired when the window closes?
   }
 }
-
-/**
- * Determine if WindowProxy is part of the boundary window.
- *
- * @param {DOMWindow} boundary
- * @param {DOMWindow} target
- *
- * @return {boolean}
- */
-function isWindowIncluded(boundary, target) {
-  if (target === boundary) {
-    return true;
-  }
-
-  // TODO(ato): Pretty sure this is not Fission compatible,
-  // but then this is a problem that needs to be solved in nsIConsoleAPI.
-  const {parent} = target;
-  if (!parent || parent === boundary) {
-    return false;
-  }
-
-  return isWindowIncluded(boundary, parent);
-}
-
-var WindowManager = {isWindowIncluded};