Skip to content

Commit 00c5a1a

Browse files
author
Alexandre Lissy
committed
WIP FELT: Block restart and force exit
Differential Revision: https://phabricator.services.mozilla.com/D262888
1 parent 4b237c1 commit 00c5a1a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

toolkit/xre/nsAppRunner.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6239,13 +6239,29 @@ int XREMain::XRE_main(int argc, char* argv[], const BootstrapConfig& aConfig) {
62396239
}
62406240
#endif
62416241

6242-
mozilla::AppShutdown::MaybeDoRestart();
6242+
#if defined(MOZ_WIDGET_FELT)
6243+
// Do not restart when running as Felt client (i.e. Enterprise browser)
6244+
bool skipRestart = false;
6245+
if (XRE_IsParentProcess()) {
6246+
Maybe<const char*> felt = geckoargs::sFelt.Get(gArgc, gArgv, CheckArgFlag::None);
6247+
if (felt.isSome()) {
6248+
skipRestart = true;
6249+
}
6250+
}
6251+
6252+
if (!skipRestart) {
6253+
#endif
6254+
mozilla::AppShutdown::MaybeDoRestart();
6255+
#if defined(MOZ_WIDGET_FELT)
6256+
}
6257+
#endif
62436258

62446259
XRE_DeinitCommandLine();
62456260

62466261
if (NS_FAILED(rv)) {
62476262
return 1;
62486263
}
6264+
62496265
return mozilla::AppShutdown::GetExitCode();
62506266
}
62516267

0 commit comments

Comments
 (0)