Backed out changeset 05208f2e0785 (bug 1790185) for causing local failures for Marinoette tests. a=backout

This commit is contained in:
Iulian Moraru 2023-05-11 16:07:55 +03:00
Родитель 215b2592f3
Коммит 5b0f4d5adf
2 изменённых файлов: 8 добавлений и 16 удалений

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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);
}
},
{ interval: 250, timeout: 5000 }
);
try {
const flags = KeepWhenOffline | LoopbackOnly;
const backlog = 1;
this.socket = new lazy.ServerSocket(this.port, flags, backlog);
} catch (e) {
throw new Error(`Could not bind to port ${this.port} (${e.name})`);
}
this.port = this.socket.port;