From 3f618e2edab4025ad922e4899a8fbea9a539dd60 Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Fri, 22 Nov 2019 08:03:05 +0000 Subject: [PATCH] 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 --- remote/RemoteAgent.jsm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remote/RemoteAgent.jsm b/remote/RemoteAgent.jsm index e2c489601c82..8847e8ba2422 100644 --- a/remote/RemoteAgent.jsm +++ b/remote/RemoteAgent.jsm @@ -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() {