mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1620745 - Bring up fork server launcher at app-startup. r=gsvelto
The fork server is not launched as expected with the preference. This patch fix the issue. Differential Revision: https://phabricator.services.mozilla.com/D65930 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
befd1cb52f
commit
3a60ba6eba
@ -125,7 +125,13 @@ already_AddRefed<ForkServerLauncher> ForkServerLauncher::Create() {
|
||||
NS_IMETHODIMP
|
||||
ForkServerLauncher::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const char16_t* aData) {
|
||||
if (!mHaveStartedClient && strcmp(aTopic, "final-ui-startup") == 0) {
|
||||
if (strcmp(aTopic, NS_XPCOM_STARTUP_CATEGORY) == 0) {
|
||||
nsCOMPtr<nsIObserverService> obsSvc =
|
||||
mozilla::services::GetObserverService();
|
||||
MOZ_ASSERT(obsSvc != nullptr);
|
||||
// preferences are not available until final-ui-startup
|
||||
obsSvc->AddObserver(this, "final-ui-startup", false);
|
||||
} else if (!mHaveStartedClient && strcmp(aTopic, "final-ui-startup") == 0) {
|
||||
if (StaticPrefs::dom_ipc_forkserver_enable_AtStartup()) {
|
||||
mHaveStartedClient = true;
|
||||
ForkServiceChild::StartForkServer();
|
||||
|
@ -17,6 +17,6 @@ Classes = [
|
||||
'headers': ['mozilla/ipc/ForkServiceChild.h'],
|
||||
'constructor': 'mozilla::ipc::ForkServerLauncher::Create',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
'categories': {'final-ui-startup': 'Fork Server Launcher'},
|
||||
'categories': {'xpcom-startup': 'Fork Server Launcher'},
|
||||
},
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user