Bug 1704998 - [remote] Don't use hidden window for WebSocket creation. r=remote-protocol-reviewers,jdescottes
authorHenrik Skupin <mail@hskupin.info>
Mon, 19 Apr 2021 17:16:14 +0000
changeset 576600 e6188f4d79c54becfce5bfec0c133cab64f0bd98
parent 576599 c4873576e7d1c748a12b9ee80d86f2a27af6be1b
child 576601 b536dcb830ff04901b25ac6ac273d0b5184265c8
push id141435
push userhskupin@mozilla.com
push dateMon, 19 Apr 2021 19:14:55 +0000
treeherderautoland@e6188f4d79c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersremote-protocol-reviewers, jdescottes
bugs1704998
milestone89.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 1704998 - [remote] Don't use hidden window for WebSocket creation. r=remote-protocol-reviewers,jdescottes Differential Revision: https://phabricator.services.mozilla.com/D112082
remote/server/WebSocketHandshake.jsm
--- a/remote/server/WebSocketHandshake.jsm
+++ b/remote/server/WebSocketHandshake.jsm
@@ -10,33 +10,27 @@ var EXPORTED_SYMBOLS = ["WebSocketHandsh
 
 const CC = Components.Constructor;
 
 const { XPCOMUtils } = ChromeUtils.import(
   "resource://gre/modules/XPCOMUtils.jsm"
 );
 
 XPCOMUtils.defineLazyModuleGetters(this, {
-  Services: "resource://gre/modules/Services.jsm",
-
   executeSoon: "chrome://remote/content/shared/Sync.jsm",
 });
 
 XPCOMUtils.defineLazyGetter(this, "CryptoHash", () => {
   return CC("@mozilla.org/security/hash;1", "nsICryptoHash", "initWithString");
 });
 
 XPCOMUtils.defineLazyGetter(this, "threadManager", () => {
   return Cc["@mozilla.org/thread-manager;1"].getService();
 });
 
-XPCOMUtils.defineLazyGetter(this, "WebSocket", () => {
-  return Services.appShell.hiddenDOMWindow.WebSocket;
-});
-
 // TODO(ato): Merge this with httpd.js so that we can respond to both HTTP/1.1
 // as well as WebSocket requests on the same server.
 
 /**
  * Write a string of bytes to async output stream
  * and return promise that resolves once all data has been written.
  * Doesn't do any UTF-16/UTF-8 conversion.
  * The string is treated as an array of bytes.