Skip to content

Commit

Permalink
Backed out changeset c486787cd9a2 (bug 1733444) for causing build bus…
Browse files Browse the repository at this point in the history
…tage on nsAppStartup.cpp.CLOSED TREE
  • Loading branch information
ncsoregi committed Sep 30, 2021
1 parent a91484d commit d7366e9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
6 changes: 0 additions & 6 deletions browser/app/nsBrowserApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,6 @@ int main(int argc, char* argv[], char* envp[]) {
#if defined(XP_WIN) || defined(XP_MACOSX)
if (argc > 1 && IsArg(argv[1], "silentmode")) {
::putenv(const_cast<char*>("MOZ_APP_SILENT_START=1"));
# if defined(XP_WIN)
// On windows We also want to set a separate variable, which we want to
// persist across restarts, which will let us keep the process alive
// even if the last window is closed.
::putenv(const_cast<char*>("MOZ_APP_ALLOW_WINDOWLESS=1"));
# endif
}
#endif

Expand Down
10 changes: 2 additions & 8 deletions toolkit/components/startup/nsAppStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,6 @@ nsAppStartup::nsAppStartup()

// Make sure to clear this in case we restart again non-silently.
PR_SetEnv("MOZ_APP_SILENT_START=");

#ifdef XP_WIN
char* mozAppAllowWindowless = PR_GetEnv("MOZ_APP_ALLOW_WINDOWLESS");
mAllowWindowless =
mozAppAllowWindowless && (strcmp(mozAppAllowWindowless, "") != 0);
#endif
}

nsresult nsAppStartup::Init() {
Expand Down Expand Up @@ -285,7 +279,7 @@ nsAppStartup::Run(void) {
#ifdef XP_MACOSX
EnterLastWindowClosingSurvivalArea();
#else
if (mAllowWindowless) {
if (mWasSilentlyStarted) {
EnterLastWindowClosingSurvivalArea();
}
#endif
Expand Down Expand Up @@ -426,7 +420,7 @@ nsAppStartup::Quit(uint32_t aMode, int aExitCode, bool* aUserAllowedQuit) {
// now even the Mac wants to quit when the last window is closed
ExitLastWindowClosingSurvivalArea();
#else
if (mAllowWindowless) {
if (mWasSilentlyStarted) {
ExitLastWindowClosingSurvivalArea();
}
#endif
Expand Down
3 changes: 0 additions & 3 deletions toolkit/components/startup/nsAppStartup.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ class nsAppStartup final : public nsIAppStartup,
bool mWasSilentlyStarted; // Was this startup a silent start?

#if defined(XP_WIN)
// If true, allow the process to live on after the last window is closed
bool mAllowWindowless;

// Interaction with OS-provided profiling probes
typedef mozilla::probes::ProbeManager ProbeManager;
typedef mozilla::probes::Probe Probe;
Expand Down

0 comments on commit d7366e9

Please sign in to comment.