diff --git a/toolkit/xre/nsNativeAppSupportUnix.cpp b/toolkit/xre/nsNativeAppSupportUnix.cpp index 380fbc4cb7dc..17726f78b7d1 100644 --- a/toolkit/xre/nsNativeAppSupportUnix.cpp +++ b/toolkit/xre/nsNativeAppSupportUnix.cpp @@ -326,22 +326,20 @@ void nsNativeAppSupportUnix::SaveYourselfCB(SmcConn smc_conn, } bool status = false; - if (save_style != SmSaveGlobal) { - nsCOMPtr didSaveSession = - do_CreateInstance(NS_SUPPORTS_PRBOOL_CONTRACTID); + nsCOMPtr didSaveSession = + do_CreateInstance(NS_SUPPORTS_PRBOOL_CONTRACTID); - if (!didSaveSession) { - SmcSaveYourselfDone(smc_conn, True); - return; - } - - // Notify observers to save the session state - didSaveSession->SetData(false); - obsServ->NotifyObservers(didSaveSession, "session-save", nullptr); - - didSaveSession->GetData(&status); + if (!didSaveSession) { + SmcSaveYourselfDone(smc_conn, True); + return; } + // Notify observers to save the session state + didSaveSession->SetData(false); + obsServ->NotifyObservers(didSaveSession, "session-save", nullptr); + + didSaveSession->GetData(&status); + // If the interact style permits us to, we are shutting down and we didn't // manage to (or weren't asked to) save the local state, then notify the user // in advance that we are doing to quit (assuming that we aren't already