Skip to content

Commit 5a8b026

Browse files
author
Iulian Moraru
committedMay 11, 2023
Backed out changeset 05208f2e0785 (bug 1790185) for causing local failures for Marinoette tests. a=backout
1 parent f383f05 commit 5a8b026

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed
 

‎remote/components/Marionette.sys.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ class MarionetteParentProcess {
226226
this.server.start();
227227
} catch (e) {
228228
lazy.logger.fatal("Marionette server failed to start", e);
229+
await this.uninit();
229230
Services.startup.quit(Ci.nsIAppStartup.eForceQuit);
230231
return;
231232
}

‎remote/marionette/server.sys.mjs

+7-16
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
1515
Log: "chrome://remote/content/shared/Log.sys.mjs",
1616
MarionettePrefs: "chrome://remote/content/marionette/prefs.sys.mjs",
1717
Message: "chrome://remote/content/marionette/message.sys.mjs",
18-
PollPromise: "chrome://remote/content/shared/Sync.sys.mjs",
1918
Response: "chrome://remote/content/marionette/message.sys.mjs",
2019
});
2120

@@ -69,21 +68,13 @@ export class TCPListener {
6968
set acceptConnections(value) {
7069
if (value) {
7170
if (!this.socket) {
72-
lazy.PollPromise(
73-
(resolve, reject) => {
74-
try {
75-
const flags = KeepWhenOffline | LoopbackOnly;
76-
const backlog = 1;
77-
this.socket = new lazy.ServerSocket(this.port, flags, backlog);
78-
resolve();
79-
} catch (e) {
80-
const message = `Could not bind to port ${this.port} (${e.name})`;
81-
lazy.logger.debug(message);
82-
reject(message);
83-
}
84-
},
85-
{ interval: 250, timeout: 5000 }
86-
);
71+
try {
72+
const flags = KeepWhenOffline | LoopbackOnly;
73+
const backlog = 1;
74+
this.socket = new lazy.ServerSocket(this.port, flags, backlog);
75+
} catch (e) {
76+
throw new Error(`Could not bind to port ${this.port} (${e.name})`);
77+
}
8778

8879
this.port = this.socket.port;
8980

0 commit comments

Comments
 (0)
Failed to load comments.