mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 06:38:36 +00:00
Bug 342885: Session restore launches even when I haven't crashed, patch by Simon B�nzli <zeniko@gmail.com>, r=me, sr=neil
This commit is contained in:
parent
837541ed1c
commit
534742c2cc
@ -96,6 +96,7 @@ const DEFAULT_RESUME_FROM_CRASH = true;
|
||||
const OBSERVING = [
|
||||
"domwindowopened", "domwindowclosed",
|
||||
"quit-application-requested", "quit-application-granted",
|
||||
"quit-application-roughly", // XXXzeniko work-around for bug 333907
|
||||
"quit-application", "browser:purge-session-history"
|
||||
];
|
||||
|
||||
@ -295,6 +296,7 @@ SessionStoreService.prototype = {
|
||||
this._loadState = STATE_QUITTING;
|
||||
break;
|
||||
case "quit-application":
|
||||
case "quit-application-roughly":
|
||||
if (aData == "restart")
|
||||
this._prefBranch.setBoolPref("sessionstore.resume_session_once", true);
|
||||
this._loadState = STATE_QUITTING; // just to be sure
|
||||
|
@ -5262,6 +5262,16 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
||||
break;
|
||||
#endif
|
||||
|
||||
case WM_ENDSESSION:
|
||||
// XXXzeniko allow components to deal with a rough shutdown as long as there's no
|
||||
// clean fix for bug 333907
|
||||
if (wParam) {
|
||||
nsCOMPtr<nsIObserverService> observerService
|
||||
= do_GetService("@mozilla.org/observer-service;1");
|
||||
if (observerService)
|
||||
observerService->NotifyObservers(nsnull, "quit-application-roughly", nsnull);
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef WINCE
|
||||
case WM_HIBERNATE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user