bug 1543115: remote: set needed prefs earlier at startup; r=remote-protocol-reviewers,maja_zf

Although it currently makes no difference, we should ensure the
required preferences are set sooner, in case any of the internal
remote agent features depend on it.

Because we also cannot control when the nsICommandLineHandler for
the remote agent is invoked, setting it sooner rather than later,
seems a lot safer.

Differential Revision: https://phabricator.services.mozilla.com/D50283

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Tolfsen 2019-11-22 08:03:05 +00:00
Родитель d25d3a1256
Коммит 3f618e2eda
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -64,6 +64,8 @@ class RemoteAgentClass {
return;
}
Preferences.set(RecommendedPreferences);
this.server = new HttpServer();
this.server.registerPrefixHandler("/json/", new JSONHandler(this));
@ -93,8 +95,6 @@ class RemoteAgentClass {
await this.close();
throw new Error(`Unable to start remote agent: ${e.message}`, e);
}
Preferences.set(RecommendedPreferences);
}
async close() {