diff options
Diffstat (limited to 'toolkit/components/startup/nsAppStartup.cpp')
-rw-r--r-- | toolkit/components/startup/nsAppStartup.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp index 53f8c56702..ffff6e50ae 100644 --- a/toolkit/components/startup/nsAppStartup.cpp +++ b/toolkit/components/startup/nsAppStartup.cpp @@ -274,10 +274,6 @@ nsAppStartup::Run(void) // with a zombie process. if (!mShuttingDown && mConsiderQuitStopper != 0) { -#ifdef XP_MACOSX - EnterLastWindowClosingSurvivalArea(); -#endif - mRunning = true; nsresult rv = mAppShell->Run(); @@ -313,45 +309,10 @@ nsAppStartup::Quit(uint32_t aMode) // If we're considering quitting, we will only do so if: if (ferocity == eConsiderQuit) { -#ifdef XP_MACOSX - nsCOMPtr<nsIAppShellService> appShell - (do_GetService(NS_APPSHELLSERVICE_CONTRACTID)); - bool hasHiddenPrivateWindow = false; - if (appShell) { - appShell->GetHasHiddenPrivateWindow(&hasHiddenPrivateWindow); - } - int32_t suspiciousCount = hasHiddenPrivateWindow ? 2 : 1; -#endif - if (mConsiderQuitStopper == 0) { // there are no windows... ferocity = eAttemptQuit; } -#ifdef XP_MACOSX - else if (mConsiderQuitStopper == suspiciousCount) { - // ... or there is only a hiddenWindow left, and it's useless: - - // Failure shouldn't be fatal, but will abort quit attempt: - if (!appShell) - return NS_OK; - - bool usefulHiddenWindow; - appShell->GetApplicationProvidedHiddenWindow(&usefulHiddenWindow); - nsCOMPtr<nsIXULWindow> hiddenWindow; - appShell->GetHiddenWindow(getter_AddRefs(hiddenWindow)); - // If the remaining windows are useful, we won't quit: - nsCOMPtr<nsIXULWindow> hiddenPrivateWindow; - if (hasHiddenPrivateWindow) { - appShell->GetHiddenPrivateWindow(getter_AddRefs(hiddenPrivateWindow)); - if ((!hiddenWindow && !hiddenPrivateWindow) || usefulHiddenWindow) - return NS_OK; - } else if (!hiddenWindow || usefulHiddenWindow) { - return NS_OK; - } - - ferocity = eAttemptQuit; - } -#endif } nsCOMPtr<nsIObserverService> obsService; @@ -406,10 +367,6 @@ nsAppStartup::Quit(uint32_t aMode) if (!mAttemptingQuit) { mAttemptingQuit = true; -#ifdef XP_MACOSX - // now even the Mac wants to quit when the last window is closed - ExitLastWindowClosingSurvivalArea(); -#endif if (obsService) obsService->NotifyObservers(nullptr, "quit-application-granted", nullptr); } |