зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 05208f2e0785 (bug 1790185) for causing local failures for Marinoette tests. a=backout
This commit is contained in:
Родитель
215b2592f3
Коммит
5b0f4d5adf
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче