Commit 5b0f4d5a authored by Iulian Moraru's avatar Iulian Moraru
Browse files

Backed out changeset 05208f2e0785 (bug 1790185) for causing local failures for...

Backed out changeset 05208f2e0785 (bug 1790185) for causing local failures for Marinoette tests. a=backout
parent 215b2592
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ class MarionetteParentProcess {
      this.server.start();
    } catch (e) {
      lazy.logger.fatal("Marionette server failed to start", e);
      await this.uninit();
      Services.startup.quit(Ci.nsIAppStartup.eForceQuit);
      return;
    }
+7 −16
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
  Log: "chrome://remote/content/shared/Log.sys.mjs",
  MarionettePrefs: "chrome://remote/content/marionette/prefs.sys.mjs",
  Message: "chrome://remote/content/marionette/message.sys.mjs",
  PollPromise: "chrome://remote/content/shared/Sync.sys.mjs",
  Response: "chrome://remote/content/marionette/message.sys.mjs",
});

@@ -69,21 +68,13 @@ export class TCPListener {
  set acceptConnections(value) {
    if (value) {
      if (!this.socket) {
        lazy.PollPromise(
          (resolve, reject) => {
        try {
          const flags = KeepWhenOffline | LoopbackOnly;
          const backlog = 1;
          this.socket = new lazy.ServerSocket(this.port, flags, backlog);
              resolve();
        } catch (e) {
              const message = `Could not bind to port ${this.port} (${e.name})`;
              lazy.logger.debug(message);
              reject(message);
          throw new Error(`Could not bind to port ${this.port} (${e.name})`);
        }
          },
          { interval: 250, timeout: 5000 }
        );

        this.port = this.socket.port;